Fixes only a single crate in a workspace?
Closed this issue · 1 comments
djc commented
I just tried the 2018 edition upgrade on the Askama repo. For some reason, it fails to apply upgrades in the askama_derive
crate (maybe because it's a proc-macro crate)? Exact error messages:
warning: failed to automatically apply fixes suggested by rustc to crate `askama_derive`
after fixes were automatically applied the compiler reported errors within these files:
* askama_derive/src/lib.rs
This likely indicates a bug in either rustc or rustfix itself,
and we would appreciate a bug report! You're likely to see
a number of compiler warnings after this message which rustfix
attempted to fix but failed. If you could open an issue at
https://github.com/rust-lang-nursery/rustfix/issues
quoting the full output of this command we'd be very appreciative!
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/generator.rs:2:5
|
2 | use input::TemplateInput;
| ^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::input::TemplateInput`
|
= note: `-W absolute-paths-not-starting-with-crate` implied by `-W rust-2018-compatibility`
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/generator.rs:3:5
|
3 | use parser::{self, Cond, Expr, MatchParameter, MatchVariant, Node, Target, When, WS};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::parser::{self, Cond, Expr, MatchParameter, MatchVariant, Node, Target, When, WS}`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/generator.rs:4:5
|
4 | use shared::{filters, path};
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::shared::{filters, path}`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/input.rs:1:5
|
1 | use shared::path;
| ^^^^^^^^^^^^ help: use `crate`: `crate::shared::path`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/parser.rs:115:9
|
115 | use parser::ContentState::*;
| ^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::parser::ContentState::*`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/lib.rs:15:5
|
15 | use input::{Print, Source, TemplateInput};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::input::{Print, Source, TemplateInput}`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/lib.rs:16:5
|
16 | use parser::{Expr, Macro, Node};
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `crate`: `crate::parser::{Expr, Macro, Node}`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/lib.rs:18:5
|
18 | use shared::path;
| ^^^^^^^^^^^^ help: use `crate`: `crate::shared::path`
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
warning: absolute paths must start with `self`, `super`, `crate`, or an external crate name in the 2018 edition
--> askama_derive/src/lib.rs:24:1
|
24 | / pub fn derive_template(input: TokenStream) -> TokenStream {
25 | | let ast: syn::DeriveInput = syn::parse(input).unwrap();
26 | | match ast.data {
27 | | syn::Data::Struct(ref data) => data,
... |
30 | | build_template(&ast).parse().unwrap()
31 | | }
| |_^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2018 edition!
= note: for more information, see issue TBD
help: use `crate`
|
24 | crate::pub fn derive_template(input: TokenStream) -> TokenStream {
25 | let ast: syn::DeriveInput = syn::parse(input).unwrap();
26 | match ast.data {
27 | syn::Data::Struct(ref data) => data,
28 | _ => panic!("#[derive(Template)] can only be used with structs"),
29 | };
...
alexcrichton commented
Thanks for the report! I've moved this over to rust-lang/rust#52214