Skip to content

Rollup of 7 pull requests #103022

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

Closed
wants to merge 20 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5f43ea5
check if the self type is `ty::Float` before getting second substs
TaKO8Ki Oct 13, 2022
9b8aa65
normalize stderr
TaKO8Ki Oct 13, 2022
3df9afc
rustdoc: don't ICE on `TyKind::Typeof`
WaffleLapkin Oct 13, 2022
097b6d3
Add suggestion to the "missing native library" error
wesleywiser Oct 13, 2022
c47337e
Update browser-ui-test version to 0.12.3
GuillaumeGomez Oct 13, 2022
16cfd6c
Improve code for unsafe-fn rustdoc GUI test
GuillaumeGomez Oct 13, 2022
577d2cf
Add test for issue 102986
WaffleLapkin Oct 13, 2022
6d609c5
Add new bootstrap entrypoints to triagebot
Noratrieb Oct 13, 2022
de0396c
Ensure enum cast moves
nbdd0121 Oct 13, 2022
d2d3d94
replace ReErased with fresh region vars in opaque types
aliemjay Oct 13, 2022
f1452fc
Add test for issue 102389
nbdd0121 Oct 13, 2022
247da7b
Bless tests
nbdd0121 Oct 13, 2022
4a25a49
Fix test
nbdd0121 Oct 13, 2022
34c8a39
Rollup merge of #103000 - wesleywiser:suggest_libname, r=compiler-errors
matthiaskrgr Oct 13, 2022
e991efd
Rollup merge of #103003 - TaKO8Ki:fix-102989, r=compiler-errors
matthiaskrgr Oct 13, 2022
e35ac3d
Rollup merge of #103006 - WaffleLapkin:rustdoc_dont, r=compiler-errors
matthiaskrgr Oct 13, 2022
7131984
Rollup merge of #103008 - aliemjay:opaque-parent-substs, r=oli-obk
matthiaskrgr Oct 13, 2022
850e65a
Rollup merge of #103011 - GuillaumeGomez:improve-unsafe-fn-gui-test, …
matthiaskrgr Oct 13, 2022
300b8fb
Rollup merge of #103013 - Nilstrieb:patch-1, r=jyn514
matthiaskrgr Oct 13, 2022
f6cc372
Rollup merge of #103016 - nbdd0121:enum, r=pnkfelix
matthiaskrgr Oct 13, 2022
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
Add test for issue 102389
  • Loading branch information
nbdd0121 committed Oct 13, 2022
commit f1452fc1c99bc6d126a096694b0f70d9fe4734b6
8 changes: 8 additions & 0 deletions src/test/ui/mir/issue-102389.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
enum Enum { A, B, C }

fn func(inbounds: &Enum, array: &[i16; 3]) -> i16 {
array[*inbounds as usize]
//~^ ERROR [E0507]
}

fn main() {}
9 changes: 9 additions & 0 deletions src/test/ui/mir/issue-102389.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
error[E0507]: cannot move out of `*inbounds` which is behind a shared reference
--> $DIR/issue-102389.rs:4:11
|
LL | array[*inbounds as usize]
| ^^^^^^^^^ move occurs because `*inbounds` has type `Enum`, which does not implement the `Copy` trait

error: aborting due to previous error

For more information about this error, try `rustc --explain E0507`.