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#87347 - GuillaumeGomez:rollup-ke92xxc, r=Guil…
…laumeGomez Rollup of 9 pull requests Successful merges: - rust-lang#87187 (Fix NixOS detection) - rust-lang#87206 (avoid temporary vectors/reuse iterators) - rust-lang#87230 (Fix docblock <table> overflow) - rust-lang#87273 (Recognize bounds on impls as const bounds) - rust-lang#87279 (Add comments explaining the unix command-line argument support.) - rust-lang#87301 (Fix typo in compile.rs) - rust-lang#87311 (Get back the more precise suggestion spans of old regionck) - rust-lang#87321 (Add long explanation for E0722) - rust-lang#87342 (Add long explanation for E0757) Failed merges: - rust-lang#87270 (Don't display <table> in item summary) r? `@ghost` `@rustbot` modify labels: rollup
- Loading branch information
Showing
28 changed files
with
184 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
The `optimize` attribute was malformed. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0722 | ||
#![feature(optimize_attribute)] | ||
#[optimize(something)] // error: invalid argument | ||
pub fn something() {} | ||
``` | ||
|
||
The `#[optimize]` attribute should be used as follows: | ||
|
||
- `#[optimize(size)]` -- instructs the optimization pipeline to generate code | ||
that's smaller rather than faster | ||
|
||
- `#[optimize(speed)]` -- instructs the optimization pipeline to generate code | ||
that's faster rather than smaller | ||
|
||
For example: | ||
|
||
``` | ||
#![feature(optimize_attribute)] | ||
#[optimize(size)] | ||
pub fn something() {} | ||
``` | ||
|
||
See [RFC 2412] for more details. | ||
|
||
[RFC 2412]: https://rust-lang.github.io/rfcs/2412-optimize-attr.html |
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,33 @@ | ||
A function was given both the `ffi_const` and `ffi_pure` attributes. | ||
|
||
Erroneous code example: | ||
|
||
```compile_fail,E0757 | ||
#![feature(ffi_const, ffi_pure)] | ||
extern "C" { | ||
#[ffi_const] | ||
#[ffi_pure] // error: `#[ffi_const]` function cannot be `#[ffi_pure]` | ||
pub fn square(num: i32) -> i32; | ||
} | ||
``` | ||
|
||
As `ffi_const` provides stronger guarantees than `ffi_pure`, remove the | ||
`ffi_pure` attribute: | ||
|
||
``` | ||
#![feature(ffi_const)] | ||
extern "C" { | ||
#[ffi_const] | ||
pub fn square(num: i32) -> i32; | ||
} | ||
``` | ||
|
||
You can get more information about `const` and `pure` in the [GCC documentation | ||
on Common Function Attributes]. The unstable Rust Book has more information | ||
about [`ffi_const`] and [`ffi_pure`]. | ||
|
||
[GCC documentation on Common Function Attributes]: https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html | ||
[`ffi_const`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/ffi-const.html | ||
[`ffi_pure`]: https://doc.rust-lang.org/nightly/unstable-book/language-features/ffi-pure.html |
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
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,9 @@ | ||
// This test ensures that the type declaration content overflow is handled inside the <pre> directly. | ||
goto: file://|DOC_PATH|/lib2/long_table/struct.Foo.html | ||
// We set a fixed size so there is no chance of "random" resize. | ||
size: (1100, 800) | ||
// Logically, the ".docblock" and the "<p>" should have the same scroll width. | ||
compare-elements-property: (".top-doc .docblock", ".top-doc .docblock > p", ["scrollWidth"]) | ||
assert-property: (".top-doc .docblock", {"scrollWidth": "816"}) | ||
// However, since there is overflow in the <table>, its scroll width is bigger. | ||
assert-property: (".top-doc .docblock table", {"scrollWidth": "1573"}) |
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 was deleted.
Oops, something went wrong.
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
Oops, something went wrong.