File tree 2 files changed +5
-3
lines changed
2 files changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -496,7 +496,7 @@ fn impl_enum(input: Enum) -> TokenStream {
496
496
// deprecated type without triggering deprecation warning on the generated impl.
497
497
fn call_site_ident ( ident : & Ident ) -> Ident {
498
498
let mut ident = ident. clone ( ) ;
499
- ident. set_span ( Span :: call_site ( ) ) ;
499
+ ident. set_span ( ident . span ( ) . resolved_at ( Span :: call_site ( ) ) ) ;
500
500
ident
501
501
}
502
502
Original file line number Diff line number Diff line change 1
1
error[E0277]: `MyError` doesn't implement `std::fmt::Display`
2
- --> tests/ui/missing-display.rs:3 :10
2
+ --> tests/ui/missing-display.rs:4 :10
3
3
|
4
4
3 | #[derive(Error, Debug)]
5
- | ^^^^^ `MyError` cannot be formatted with the default formatter
5
+ | ----- in this derive macro expansion
6
+ 4 | pub enum MyError {
7
+ | ^^^^^^^ `MyError` cannot be formatted with the default formatter
6
8
|
7
9
= help: the trait `std::fmt::Display` is not implemented for `MyError`
8
10
= note: in format strings you may be able to use `{:?}` (or {:#?} for pretty-print) instead
You can’t perform that action at this time.
0 commit comments