diff options
| author | Michael Goulet <michael@errs.io> | 2022-11-16 22:21:41 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2022-11-16 22:21:41 +0000 |
| commit | 75afb22331daececeba38a3efb0134348d6c14d9 (patch) | |
| tree | 864463a325a814451214aaf4d33568b040df69f8 /src | |
| parent | 63c748ee23ab7b6706655146f5b7c7f579811803 (diff) | |
| download | rust-75afb22331daececeba38a3efb0134348d6c14d9.tar.gz rust-75afb22331daececeba38a3efb0134348d6c14d9.zip | |
Check `dyn*` return type correctly
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/dyn-star/return.rs | 10 | ||||
| -rw-r--r-- | src/test/ui/dyn-star/return.stderr | 11 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/test/ui/dyn-star/return.rs b/src/test/ui/dyn-star/return.rs new file mode 100644 index 00000000000..fa3d8d7d506 --- /dev/null +++ b/src/test/ui/dyn-star/return.rs @@ -0,0 +1,10 @@ +// check-pass + +#![feature(dyn_star)] +//~^ WARN the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes + +fn _foo() -> dyn* Unpin { + 4usize +} + +fn main() {} diff --git a/src/test/ui/dyn-star/return.stderr b/src/test/ui/dyn-star/return.stderr new file mode 100644 index 00000000000..e000351a68f --- /dev/null +++ b/src/test/ui/dyn-star/return.stderr @@ -0,0 +1,11 @@ +warning: the feature `dyn_star` is incomplete and may not be safe to use and/or cause compiler crashes + --> $DIR/return.rs:3:12 + | +LL | #![feature(dyn_star)] + | ^^^^^^^^ + | + = note: see issue #91611 <https://github.com/rust-lang/rust/issues/91611> for more information + = note: `#[warn(incomplete_features)]` on by default + +warning: 1 warning emitted + |
