Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
94c9d0c
Make non-zero check more obvious
WaffleLapkin Jul 30, 2023
9017b97
Improve the warning messages for the `#[diagnostic::on_unimplemented]`
weiznich Oct 19, 2023
3d03a8a
Fix a span for one of the test cases
weiznich Oct 20, 2023
4aaf8e0
on unresolved import disambiguate suggested path if it would collide
fmease Oct 21, 2023
079b290
Do not suggest 'Trait<Assoc=arg>' when in trait impl
gurry Oct 25, 2023
af8a998
Rename `AsyncCoroutineKind` to `CoroutineSource`
oli-obk Oct 23, 2023
024ca99
Uplift Canonical to rustc_type_ir
compiler-errors Oct 21, 2023
8f3b4f9
Add a IsIdentity extension trait for CanonicalUserType
compiler-errors Oct 23, 2023
92b41ee
Rename in preparation for moving the `async` printing out of `Corouti…
oli-obk Oct 25, 2023
c601ade
Refactor away the need for some `descr` methods.
oli-obk Oct 25, 2023
6cb3376
Add a comment explaining some weird `is_vtable_safe_method` behavior
WaffleLapkin Jul 30, 2023
8958235
Don't allow dead code
WaffleLapkin Jul 30, 2023
ecdbefa
Return multiple object-safety violation errors
WaffleLapkin Jul 30, 2023
d3fb29a
Rollup merge of #116401 - WaffleLapkin:vtablin''', r=oli-obk
matthiaskrgr Oct 25, 2023
824dbb5
Rollup merge of #116553 - gurry:116464-assoc-type-invalid-suggestion,…
matthiaskrgr Oct 25, 2023
d30fe8b
Rollup merge of #116931 - weiznich:improve_diagnostic_on_unimplemente…
matthiaskrgr Oct 25, 2023
f783ce9
Rollup merge of #117008 - compiler-errors:canonical, r=lcnr
matthiaskrgr Oct 25, 2023
2a027fa
Rollup merge of #117009 - fmease:diag-disambig-sugg-crate, r=b-naber
matthiaskrgr Oct 25, 2023
4e4e561
Rollup merge of #117175 - oli-obk:gen_fn_split, r=compiler-errors
matthiaskrgr Oct 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix a span for one of the test cases
  • Loading branch information
weiznich committed Oct 20, 2023
commit 3d03a8a6537ae944d38fb22b2edd1df0dcbaeeb1
Original file line number Diff line number Diff line change
@@ -1,22 +1,20 @@
#![feature(diagnostic_namespace)]

#[diagnostic::on_unimplemented(
if(Self = "()"),
//~^WARN malformed `on_unimplemented` attribute
//~|WARN malformed `on_unimplemented` attribute
if(Self = ()),
message = "not used yet",
label = "not used yet",
note = "not used yet"
message = "custom message",
note = "custom note"
)]
#[diagnostic::on_unimplemented(message = "fallback!!")]
#[diagnostic::on_unimplemented(label = "fallback label")]
#[diagnostic::on_unimplemented(note = "fallback note")]
#[diagnostic::on_unimplemented(message = "fallback2!!")]
trait Foo {}

fn takes_foo(_: impl Foo) {}

fn main() {
takes_foo(());
//~^ERROR fallback!!
//~^ERROR custom message
}
Original file line number Diff line number Diff line change
@@ -1,50 +1,38 @@
warning: malformed `on_unimplemented` attribute
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:3:1
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:4:5
|
LL | / #[diagnostic::on_unimplemented(
LL | |
LL | |
LL | | if(Self = ()),
... |
LL | | note = "not used yet"
LL | | )]
| |__^ invalid option found here
LL | if(Self = "()"),
| ^^^^^^^^^^^^^^^ invalid option found here
|
= help: only `message`, `note` and `label` are allowed as options
= note: `#[warn(unknown_or_malformed_diagnostic_attributes)]` on by default

warning: malformed `on_unimplemented` attribute
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:3:1
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:4:5
|
LL | / #[diagnostic::on_unimplemented(
LL | |
LL | |
LL | | if(Self = ()),
... |
LL | | note = "not used yet"
LL | | )]
| |__^ invalid option found here
LL | if(Self = "()"),
| ^^^^^^^^^^^^^^^ invalid option found here
|
= help: only `message`, `note` and `label` are allowed as options
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0277]: fallback!!
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:20:15
error[E0277]: custom message
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:18:15
|
LL | takes_foo(());
| --------- ^^ fallback label
| |
| required by a bound introduced by this call
|
= help: the trait `Foo` is not implemented for `()`
= note: fallback note
= note: custom note
help: this trait has no implementations, consider adding one
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:1
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:13:1
|
LL | trait Foo {}
| ^^^^^^^^^
note: required by a bound in `takes_foo`
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:17:22
--> $DIR/ignore_unsupported_options_and_continue_to_use_fallback.rs:15:22
|
LL | fn takes_foo(_: impl Foo) {}
| ^^^ required by this bound in `takes_foo`
Expand Down