shrinking the deprecated method span#85018
Conversation
|
r? @estebank (rust-highfive has picked a reviewer for you, use r? to override) |
|
I don't know if passing method span is a good solution😆 |
estebank
left a comment
There was a problem hiding this comment.
I'm happy with the changes, and it'd be fine to pass in a new param, but can't we use the existing Span parameter?
| // error will be reported on any use of such resolution anyway. | ||
| let ctor_def_id = variant_def.ctor_def_id.unwrap_or(variant_def.def_id); | ||
| tcx.check_stability(ctor_def_id, Some(expr_id), span); | ||
| tcx.check_stability(ctor_def_id, Some(expr_id), span, Some(method_name.span)); |
There was a problem hiding this comment.
What happens if you change this and the change below to pass method_name.span on the already existing span parameter?
There was a problem hiding this comment.
Will get an error:
error[E0658]: use of unstable library feature 'fmt_internals': internal to format_args!
--> /Users/rustin/ClionProjects/rust/library/core/src/macros/mod.rs:473:49
|
473 | ($dst:expr, $($arg:tt)*) => ($dst.write_fmt($crate::format_args!($($arg)*)))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: add `#![feature(fmt_internals)]` to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
error: could not compile `rustc-demangle`
There was a problem hiding this comment.
rust/compiler/rustc_span/src/lib.rs
Line 512 in d6d0283
It looks like this is because allow_internal_unstable is not recognized when we use method_span.
|
@bors r+ |
|
📌 Commit 7c5bc20 has been approved by |
Rollup of 8 pull requests Successful merges: - rust-lang#83501 (rustdoc: Add unstable CLI option to show basic type layout information) - rust-lang#85018 (shrinking the deprecated method span) - rust-lang#85124 (rustdoc: remove explicit boolean comparisons.) - rust-lang#85136 (Change param name (k to key and v to value) in std::env module) - rust-lang#85162 (Fix typo in variable name) - rust-lang#85187 (Use .name_str() to format primitive types in error messages) - rust-lang#85191 (Improve rustdoc gui tester) - rust-lang#85196 (Revert "Auto merge of rust-lang#84797 - richkadel:cover-unreachable-statements…) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
close #84637