Auto merge of #75351 - JohnTitor:rollup-q9udsyx, r=JohnTitor
Rollup of 8 pull requests Successful merges: - #74200 (Std panicking unsafe block in unsafe fn) - #75286 (Add additional case for Path starts with) - #75318 (Resolve `char` as a primitive even if there is a module in scope) - #75320 (Detect likely `for foo of bar` JS syntax) - #75328 (Cleanup E0749) - #75344 (Rename "Important traits" to "Notable traits") - #75348 (Move to intra-doc links in library/core/src/time.rs) - #75350 (Do not ICE when lowering invalid extern fn with bodies) Failed merges: r? @ghost
This commit is contained in:
commit
cee62c17aa
22 changed files with 162 additions and 60 deletions
|
|
@ -8,5 +8,10 @@ pub mod char {}
|
|||
pub struct MyString;
|
||||
|
||||
/// See also [char]
|
||||
// @has intra_link_prim_precedence/struct.MyString2.html '//a/@href' 'intra_link_prim_precedence/char/index.html'
|
||||
// @has intra_link_prim_precedence/struct.MyString2.html '//a/@href' 'https://doc.rust-lang.org/nightly/std/primitive.char.html'
|
||||
pub struct MyString2;
|
||||
|
||||
/// See also [crate::char] and [mod@char]
|
||||
// @has intra_link_prim_precedence/struct.MyString3.html '//*[@href="../intra_link_prim_precedence/char/index.html"]' 'crate::char'
|
||||
// @has - '//*[@href="../intra_link_prim_precedence/char/index.html"]' 'mod@char'
|
||||
pub struct MyString3;
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@
|
|||
fn main() {
|
||||
for _i in 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
for _i in 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,4 +3,6 @@
|
|||
fn main() {
|
||||
for _i 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
for _i of 0..2 { //~ ERROR missing `in`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,5 +4,11 @@ error: missing `in` in `for` loop
|
|||
LL | for _i 0..2 {
|
||||
| ^ help: try adding `in` here
|
||||
|
||||
error: aborting due to previous error
|
||||
error: missing `in` in `for` loop
|
||||
--> $DIR/issue-40782.rs:6:12
|
||||
|
|
||||
LL | for _i of 0..2 {
|
||||
| ^^ help: try using `in` here instead
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
6
src/test/ui/issues/issue-75283.rs
Normal file
6
src/test/ui/issues/issue-75283.rs
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
extern "C" {
|
||||
fn lol() { //~ ERROR incorrect function inside `extern` block
|
||||
println!("");
|
||||
}
|
||||
}
|
||||
fn main() {}
|
||||
18
src/test/ui/issues/issue-75283.stderr
Normal file
18
src/test/ui/issues/issue-75283.stderr
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
error: incorrect function inside `extern` block
|
||||
--> $DIR/issue-75283.rs:2:8
|
||||
|
|
||||
LL | extern "C" {
|
||||
| ---------- `extern` blocks define existing foreign functions and functions inside of them cannot have a body
|
||||
LL | fn lol() {
|
||||
| ________^^^___-
|
||||
| | |
|
||||
| | cannot have a body
|
||||
LL | | println!("");
|
||||
LL | | }
|
||||
| |_____- help: remove the invalid body: `;`
|
||||
|
|
||||
= help: you might have meant to write a function accessible through FFI, which can be done by writing `extern fn` outside of the `extern` block
|
||||
= note: for more information, visit https://doc.rust-lang.org/std/keyword.extern.html
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue