-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #82062 - Mark-Simulacrum:beta-next, r=Mark-Simulacrum
[beta] backports This backports some PRs and bumps to the released stable compiler: * bootstrap: fix wrong docs installation path #81968 * parser: Fix panic in 'const impl' recovery #81876 * Don't display `mut` in arguments for functions documentation #81831 r? `@Mark-Simulacrum`
- Loading branch information
Showing
9 changed files
with
124 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
// Rustdoc shouldn't display `mut` in function arguments, which are | ||
// implementation details. Regression test for #81289. | ||
|
||
#![crate_name = "foo"] | ||
|
||
pub struct Foo; | ||
|
||
// @count foo/struct.Foo.html '//*[@class="impl-items"]//*[@class="method"]' 2 | ||
// @!has - '//*[@class="impl-items"]//*[@class="method"]' 'mut' | ||
impl Foo { | ||
pub fn foo(mut self) {} | ||
|
||
pub fn bar(mut bar: ()) {} | ||
} | ||
|
||
// @count foo/fn.baz.html '//*[@class="rust fn"]' 1 | ||
// @!has - '//*[@class="rust fn"]' 'mut' | ||
pub fn baz(mut foo: Foo) {} |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#![crate_name = "foo"] | ||
|
||
// @has foo/fn.f.html | ||
// @has - '//*[@class="rust fn"]' 'pub fn f(0u8 ...255: u8)' | ||
// @has - '//*[@class="rust fn"]' 'pub fn f(_: u8)' | ||
pub fn f(0u8...255: u8) {} |
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,5 @@ | ||
trait T { const | ||
impl //~ ERROR: expected identifier, found keyword `impl` | ||
} | ||
|
||
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,17 @@ | ||
error: expected identifier, found keyword `impl` | ||
--> $DIR/issue-81806.rs:2:1 | ||
| | ||
LL | trait T { const | ||
| - while parsing this item list starting here | ||
LL | impl | ||
| ^^^^ expected identifier, found keyword | ||
LL | } | ||
| - the item list ends here | ||
| | ||
help: you can escape reserved keywords to use them as identifiers | ||
| | ||
LL | r#impl | ||
| ^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|