forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of rust-lang#97566 - compiler-errors:rollup-qfxw4j8, r=com…
…piler-errors Rollup of 6 pull requests Successful merges: - rust-lang#89685 (refactor: VecDeques Iter fields to private) - rust-lang#97172 (Optimize the diagnostic generation for `extern unsafe`) - rust-lang#97395 (Miri call ABI check: ensure type size+align stay the same) - rust-lang#97431 (don't do `Sized` and other return type checks on RPIT's real type) - rust-lang#97555 (Source code page: line number click adds `NaN`) - rust-lang#97558 (Fix typos in comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
13 changed files
with
120 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
fn foo() -> impl ?Sized { | ||
//~^ ERROR the size for values of type `impl ?Sized` cannot be known at compilation time | ||
() | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
error[E0277]: the size for values of type `impl ?Sized` cannot be known at compilation time | ||
--> $DIR/rpit-not-sized.rs:1:13 | ||
| | ||
LL | fn foo() -> impl ?Sized { | ||
| ^^^^^^^^^^^ doesn't have a size known at compile-time | ||
| | ||
= help: the trait `Sized` is not implemented for `impl ?Sized` | ||
= note: the return type of a function must have a statically known size | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0277`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
extern "C" unsafe { | ||
//~^ ERROR expected `{`, found keyword `unsafe` | ||
//~| ERROR extern block cannot be declared unsafe | ||
unsafe fn foo(); | ||
//~^ ERROR functions in `extern` blocks cannot have qualifiers | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
error: expected `{`, found keyword `unsafe` | ||
--> $DIR/unsafe-foreign-mod-2.rs:1:12 | ||
| | ||
LL | extern "C" unsafe { | ||
| ^^^^^^ expected `{` | ||
|
||
error: extern block cannot be declared unsafe | ||
--> $DIR/unsafe-foreign-mod-2.rs:1:12 | ||
| | ||
LL | extern "C" unsafe { | ||
| ^^^^^^ | ||
|
||
error: functions in `extern` blocks cannot have qualifiers | ||
--> $DIR/unsafe-foreign-mod-2.rs:4:15 | ||
| | ||
LL | extern "C" unsafe { | ||
| ----------------- in this `extern` block | ||
... | ||
LL | unsafe fn foo(); | ||
| ^^^ | ||
| | ||
help: remove the qualifiers | ||
| | ||
LL | fn foo(); | ||
| ~~ | ||
|
||
error: aborting due to 3 previous errors | ||
|