-
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
Add a regression test for ICE of bad_placeholder_type #81509
Add a regression test for ICE of bad_placeholder_type #81509
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
You might want to instead of creating a new file add this case to an existing test, like https://github.com/rust-lang/rust/blob/c6735a624b45f8170299c0539856c7d3b5f29422/src/test/ui/typeck/typeck_type_placeholder_item_help.rs |
be3c4cb
to
81ed4cf
Compare
@estebank Thank you for your advise! I moved the test to typeck_type_placeholder_item_help.rs. BTW, I checked typeck_type_placeholder_item.rs too, and I think test codes that output error with help message should be placed in typeck_type_placeholder_item_help.rs. But current code is not. |
@0yoyoyo I think the separation was for the ones that at the time had @bors r+ |
📌 Commit 81ed4cf has been approved by |
LL | const TEST4: fn() -> _ = 42; | ||
| ^ | ||
| | | ||
| not allowed in type signatures | ||
| help: use type parameters instead: `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.
Pre-existing, but we should maybe file a ticket for the inaccurate suggestion.
…as-schievink Rollup of 18 pull requests Successful merges: - rust-lang#78044 (Implement io::Seek for io::Empty) - rust-lang#79285 (Stabilize Arc::{increment,decrement}_strong_count) - rust-lang#80053 (stabilise `cargo test -- --include-ignored`) - rust-lang#80279 (Implement missing `AsMut<str>` for `str`) - rust-lang#80470 (Stabilize by-value `[T; N]` iterator `core::array::IntoIter`) - rust-lang#80945 (Add Box::downcast() for dyn Any + Send + Sync) - rust-lang#81048 (Stabilize `core::slice::fill_with`) - rust-lang#81198 (Remove requirement that forces symmetric and transitive PartialEq impls to exist) - rust-lang#81422 (Account for existing `_` field pattern when suggesting `..`) - rust-lang#81472 (Clone entire `TokenCursor` when collecting tokens) - rust-lang#81484 (Optimize decimal formatting of 128-bit integers) - rust-lang#81491 (Balance sidebar `Deref` cycle check with main content) - rust-lang#81509 (Add a regression test for ICE of bad_placeholder_type) - rust-lang#81547 (Edit rustc_typeck top-level docs) - rust-lang#81550 (Replace predecessor with range in collections documentation) - rust-lang#81558 (Fix ascii art text wrapping in mobile) - rust-lang#81562 (Clarify that InPlaceIterable guarantees extend to all advancing iterator methods.) - rust-lang#81563 (Improve docblock readability on small screen) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Add a regression test for #72685. Check the error message is output instead of ICE.