-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove redundant notes in E0275 #79110
Conversation
r? @oli-obk (rust_highfive has picked a reviewer for you, use r? to override) |
☔ The latest upstream changes (presumably #78313) made this pull request unmergeable. Please resolve the merge conflicts. Note that reviewers usually do not review pull requests until merge conflicts are resolved! Once you resolve the conflicts, you should change the labels applied by bors to indicate that your PR is ready for review. Post this as a comment to change the labels:
|
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Show resolved
Hide resolved
@@ -9,132 +9,7 @@ LL | impl<T> Foo for T where Bar<T>: Foo {} | |||
| | |||
= help: consider adding a `#![recursion_limit="256"]` attribute to your crate (`E0275`) | |||
= note: required because of the requirements on the impl of `Foo` for `Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<Bar<T>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we show one more item here? Or not? I don't have opinion on this but usually I see in math:
1
2
...
N
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me either way, r=me with this fix or without
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Given the nature of these diagnostics, each line is super long.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, I wonder if we can truncate the first and second line to the terminal width? It would be good if we can dump the real thing somewhere.
Bar<Bar<...<Bar>>>
But I imagine this heuristic might not always work or might be hard?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That heuristic might break down in some case that I'm not anticipating. Changing the pretty printer to do this will likely be involved too, but is likely worth it and could be used in other places, I just don't have the energy to tackle that now 😅
compiler/rustc_trait_selection/src/traits/error_reporting/suggestions.rs
Outdated
Show resolved
Hide resolved
8faa144
to
c12e77b
Compare
@bors r=oli-obk |
📌 Commit c12e77b has been approved by |
Remove redundant notes in E0275 Fix rust-lang#58964.
Remove redundant notes in E0275 Fix rust-lang#58964.
Rollup of 14 pull requests Successful merges: - rust-lang#78961 (Make bad "rust-call" arguments no longer ICE) - rust-lang#79082 (Improve the diagnostic for when an `fn` contains qualifiers inside an `extern` block.) - rust-lang#79090 (libary: Forward compiler-builtins "asm" and "mangled-names" feature) - rust-lang#79094 (Add //ignore-macos to pretty-std-collections.rs) - rust-lang#79101 (Don't special case constant operands when lowering intrinsics) - rust-lang#79102 (Add two regression tests) - rust-lang#79110 (Remove redundant notes in E0275) - rust-lang#79116 (compiletest: Fix a warning in debuginfo tests on windows-gnu) - rust-lang#79117 (add optimization fuel checks to some mir passes) - rust-lang#79147 (Highlight MIR as Rust on GitHub) - rust-lang#79149 (Move capture lowering from THIR to MIR) - rust-lang#79155 (fix handling the default config for profiler and sanitizers) - rust-lang#79156 (Allow using `download-ci-llvm` from directories other than the root) - rust-lang#79164 (Permit standalone generic parameters as const generic arguments in macros) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fix #58964.