-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 #86127 - JohnTitor:rollup-0c6mp3j, r=JohnTitor
Rollup of 11 pull requests Successful merges: - #85906 (Use `Iterator::find` instead of open-coding it) - #85951 (Update the documentation of `-C force-unwind-tables` for #83482) - #85985 (Clarify documentation of slice sorting methods) - #85989 (Remove rustfmt tests from top-level .gitattributes) - #86074 (Default panic message should print Box<dyn Any>) - #86078 (Type page font weight) - #86090 (:arrow_up: rust-analyzer) - #86095 (Search description codeblock) - #86096 (Comment out unused error codes and add description for E0316) - #86101 (Correct type signature in doc for Bound::as_mut) - #86103 (Remove lifetime hack) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
19 changed files
with
88 additions
and
60 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
A `where` clause contains a nested quantification over lifetimes. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0316 | ||
trait Tr<'a, 'b> {} | ||
fn foo<T>(t: T) | ||
where | ||
for<'a> &'a T: for<'b> Tr<'a, 'b>, // error: nested quantification | ||
{ | ||
} | ||
``` | ||
|
||
Rust syntax allows lifetime quantifications in two places within | ||
`where` clauses: Quantifying over the trait bound only (as in | ||
`Ty: for<'l> Trait<'l>`) and quantifying over the whole clause | ||
(as in `for<'l> &'l Ty: Trait<'l>`). Using both in the same clause | ||
leads to a nested lifetime quantification, which is not supported. | ||
|
||
The following example compiles, because the clause with the nested | ||
quantification has been rewritten to use only one `for<>`: | ||
|
||
``` | ||
trait Tr<'a, 'b> {} | ||
fn foo<T>(t: T) | ||
where | ||
for<'a, 'b> &'a T: Tr<'a, 'b>, // ok | ||
{ | ||
} | ||
``` |
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,5 @@ | ||
// This test is to ensure that the codeblocks are correctly rendered in the search results. | ||
goto: file://|DOC_PATH|/test_docs/index.html?search=some_more_function | ||
// Waiting for the search results to appear... | ||
wait-for: "#titles" | ||
assert: (".search-results .desc code", "format!") |
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,2 @@ | ||
goto: file://|DOC_PATH|/test_docs/type.SomeType.html | ||
assert-all: (".top-block .docblock p", {"font-weight": "400"}) |
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
Submodule rust-analyzer
updated
from f43839 to 13da28