File tree Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Expand file tree Collapse file tree 1 file changed +18
-18
lines changed Original file line number Diff line number Diff line change @@ -1576,6 +1576,24 @@ impl<T> schema::InheritableField<T> {
1576
1576
}
1577
1577
}
1578
1578
1579
+ impl schema:: InheritableLints {
1580
+ fn inherit_with < ' a > (
1581
+ self ,
1582
+ get_ws_inheritable : impl FnOnce ( ) -> CargoResult < schema:: TomlLints > ,
1583
+ ) -> CargoResult < schema:: TomlLints > {
1584
+ if self . workspace {
1585
+ if !self . lints . is_empty ( ) {
1586
+ anyhow:: bail!( "cannot override `workspace.lints` in `lints`, either remove the overrides or `lints.workspace = true` and manually specify the lints" ) ;
1587
+ }
1588
+ get_ws_inheritable ( ) . with_context ( || {
1589
+ "error inheriting `lints` from workspace root manifest's `workspace.lints`"
1590
+ } )
1591
+ } else {
1592
+ Ok ( self . lints )
1593
+ }
1594
+ }
1595
+ }
1596
+
1579
1597
impl schema:: InheritableDependency {
1580
1598
fn inherit_with < ' a > (
1581
1599
self ,
@@ -2141,24 +2159,6 @@ fn validate_profile_override(profile: &schema::TomlProfile, which: &str) -> Carg
2141
2159
Ok ( ( ) )
2142
2160
}
2143
2161
2144
- impl schema:: InheritableLints {
2145
- fn inherit_with < ' a > (
2146
- self ,
2147
- get_ws_inheritable : impl FnOnce ( ) -> CargoResult < schema:: TomlLints > ,
2148
- ) -> CargoResult < schema:: TomlLints > {
2149
- if self . workspace {
2150
- if !self . lints . is_empty ( ) {
2151
- anyhow:: bail!( "cannot override `workspace.lints` in `lints`, either remove the overrides or `lints.workspace = true` and manually specify the lints" ) ;
2152
- }
2153
- get_ws_inheritable ( ) . with_context ( || {
2154
- "error inheriting `lints` from workspace root manifest's `workspace.lints`"
2155
- } )
2156
- } else {
2157
- Ok ( self . lints )
2158
- }
2159
- }
2160
- }
2161
-
2162
2162
pub trait ResolveToPath {
2163
2163
fn resolve ( & self , config : & Config ) -> PathBuf ;
2164
2164
}
You can’t perform that action at this time.
0 commit comments