diff options
| author | bors <bors@rust-lang.org> | 2023-01-23 13:07:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-23 13:07:16 +0000 |
| commit | c8e6a9e8b6251bbc8276cb78cabe1998deecbed7 (patch) | |
| tree | f3fe6240d1392fe749d539d18df606b3b5b719fa /tests/ui | |
| parent | 5bef91c6e902f3bded724713bd2a64ea50abbd25 (diff) | |
| parent | eae7f947b5394aabaa9ec104ce9bc7a8633badfc (diff) | |
| download | rust-c8e6a9e8b6251bbc8276cb78cabe1998deecbed7.tar.gz rust-c8e6a9e8b6251bbc8276cb78cabe1998deecbed7.zip | |
Auto merge of #107220 - JohnTitor:rollup-5pvuz0z, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #106796 (BPF: Disable atomic CAS) - #106886 (Make stage2 rustdoc and proc-macro-srv disableable in x.py install) - #107101 (Filter param-env predicates for errors before calling `to_opt_poly_trait_pred`) - #107109 (ThinBox: Add intra-doc-links for Metadata) - #107148 (remove error code from `E0789`, add UI test/docs) - #107151 (Instantiate dominators algorithm only once) - #107153 (Consistently use dominates instead of is_dominated_by) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'tests/ui')
| -rw-r--r-- | tests/ui/error-codes/E0789.rs | 12 | ||||
| -rw-r--r-- | tests/ui/error-codes/E0789.stderr | 15 |
2 files changed, 27 insertions, 0 deletions
diff --git a/tests/ui/error-codes/E0789.rs b/tests/ui/error-codes/E0789.rs new file mode 100644 index 00000000000..c0cbbcc9d2d --- /dev/null +++ b/tests/ui/error-codes/E0789.rs @@ -0,0 +1,12 @@ +// compile-flags: --crate-type lib + +#![feature(rustc_attrs)] +#![feature(staged_api)] +#![unstable(feature = "foo_module", reason = "...", issue = "123")] + +#[rustc_allowed_through_unstable_modules] +// #[stable(feature = "foo", since = "1.0")] +struct Foo; +//~^ ERROR `rustc_allowed_through_unstable_modules` attribute must be paired with a `stable` attribute +//~^^ ERROR `rustc_allowed_through_unstable_modules` attribute must be paired with a `stable` attribute +// FIXME: we shouldn't have two errors here, only occurs when using `-Zdeduplicate-diagnostics=no` diff --git a/tests/ui/error-codes/E0789.stderr b/tests/ui/error-codes/E0789.stderr new file mode 100644 index 00000000000..faab92bae03 --- /dev/null +++ b/tests/ui/error-codes/E0789.stderr @@ -0,0 +1,15 @@ +error[E0789]: `rustc_allowed_through_unstable_modules` attribute must be paired with a `stable` attribute + --> $DIR/E0789.rs:9:1 + | +LL | struct Foo; + | ^^^^^^^^^^^ + +error[E0789]: `rustc_allowed_through_unstable_modules` attribute must be paired with a `stable` attribute + --> $DIR/E0789.rs:9:1 + | +LL | struct Foo; + | ^^^^^^^^^^^ + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0789`. |
