-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Rollup of 8 pull requests #108015
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 8 pull requests #108015
Conversation
Toml now uses [toml.io](https://toml.io) for released specifications and the github repo for development. Also the old link was for the 0.4 specification, while cargo uses toml_edit, which uses toml 1.0 (reference: https://github.com/toml-rs/toml/blob/main/crates/toml_edit/CHANGELOG.md#030---2021-09-13). Finally the discussion of "Bare keys" vs "Quoted keys" has moved from the `#table` section to `#keys`.
Added another error to be processed in fallback Solution suggested by Chris Denton nushell/nushell#6857 (comment)
Considering the following code ```rust fn foo() -> u8 { async fn async_fn() -> u8 { 22 } async_fn() } fn main() {} ``` the error generated before this commit from the compiler is ``` ➜ rust git:(macros/async_fn_suggestion) ✗ rustc test.rs --edition 2021 error[E0308]: mismatched types --> test.rs:4:5 | 1 | fn foo() -> u8 { | -- expected `u8` because of return type ... 4 | async_fn() | ^^^^^^^^^^ expected `u8`, found opaque type | = note: expected type `u8` found opaque type `impl Future<Output = u8>` help: consider `await`ing on the `Future` | 4 | async_fn().await | ++++++ error: aborting due to previous error ``` In this case the error is nor perfect, and can confuse the user that do not know that the opaque type is the future. So this commit will propose (and conclude the work start in rust-lang#80658) to change the string `opaque type` to `future` when applicable and also remove the Expected vs Received note by adding a more specific one regarding the async function that return a future type. So the new error emitted by the compiler is ``` error[E0308]: mismatched types --> test.rs:4:5 | 1 | fn foo() -> u8 { | -- expected `u8` because of return type ... 4 | async_fn() | ^^^^^^^^^^ expected `u8`, found future | note: calling an async function returns a future --> test.rs:4:5 | 4 | async_fn() | ^^^^^^^^^^ help: consider `await`ing on the `Future` | 4 | async_fn().await | ++++++ error: aborting due to previous error ``` Signed-off-by: Vincenzo Palazzo <[email protected]>
Fixes rust-lang#107944. Maximum recursive search depth is 3 and only accepts shortcuts for directories (single component paths, such as `./x.py fmt std`). If there are no shortcut candidates but single componenet path(s) are given, it falls back to the previous behavior to panic with unable to find directory. If there are multiple shortcut candidates for a given single component path, the shortcut candidates are considered ambiguous, are then ignored, and the single component path is accepted as-is. After this change, `./x.py fmt std` no longer panics and formats `library/std` instead.
Co-authored-by: Jakob Degen <[email protected]>
$ wc -c search-index.old.js search-index.new.js 3940530 search-index.old.js 3843222 search-index.new.js ((3940530-3843222)/3940530)*100 = 2.47% $ wc -c search-index.old.js.gz search-index.new.js.gz 380251 search-index.old.js.gz 379434 search-index.new.js.gz ((380251-379434)/380251)*100 = 0.214%
…ggestion, r=compiler-errors fix: improve the suggestion on future not awaited Considering the following code ```rust fn foo() -> u8 { async fn async_fn() -> u8 { 22 } async_fn() } fn main() {} ``` the error generated before this commit from the compiler is ``` ➜ rust git:(macros/async_fn_suggestion) ✗ rustc test.rs --edition 2021 error[E0308]: mismatched types --> test.rs:4:5 | 1 | fn foo() -> u8 { | -- expected `u8` because of return type ... 4 | async_fn() | ^^^^^^^^^^ expected `u8`, found opaque type | = note: expected type `u8` found opaque type `impl Future<Output = u8>` help: consider `await`ing on the `Future` | 4 | async_fn().await | ++++++ error: aborting due to previous error ``` In this case the error is nor perfect, and can confuse the user that do not know that the opaque type is the future. So this commit will propose (and conclude the work start in rust-lang#80658) to change the string `opaque type` to `future` when applicable and also remove the Expected vs Received note by adding a more specific one regarding the async function that return a future type. So the new error emitted by the compiler is ``` error[E0308]: mismatched types --> test.rs:4:5 | 1 | fn foo() -> u8 { | -- expected `u8` because of return type ... 4 | async_fn() | ^^^^^^^^^^ expected `u8`, found future | note: calling an async function returns a future --> test.rs:4:5 | 4 | async_fn() | ^^^^^^^^^^ help: consider `await`ing on the `Future` | 4 | async_fn().await | ++++++ error: aborting due to previous error ``` Fixes rust-lang#80658 It remains to rework the case described in the following issue rust-lang#107899 but I think this deserves its own PR after we discuss a little bit how to handle these kinds of cases. r? `@eholk` `@rustbot` label +I-async-nominated Signed-off-by: Vincenzo Palazzo <[email protected]>
Update broken link in cargo style guide Toml now uses [toml.io](https://toml.io) for released specifications and the github repo for development. Also the old link was for the 0.4 specification, while cargo uses toml_edit, which uses toml 1.0 (reference: https://github.com/toml-rs/toml/blob/main/crates/toml_edit/CHANGELOG.md#030---2021-09-13). Finally the discussion of "Bare keys" vs "Quoted keys" has moved from the `#table` section to `#keys`.
…mpl-bad-spans, r=Nilstrieb Tighter spans for bad inherent `impl` self types Self-explanatory
Allow shortcuts to directories to be used for ./x.py fmt Fixes rust-lang#107944. Maximum recursive search depth is 3 and only accepts shortcuts for directories. If there are no shortcut candidates, the previous behavior to panic is preserved. If there are multiple candidates, the shortcut candidates are ignored. After this change, `./x.py fmt std` no longer panics and formats `library/std` instead.
Clearly document intentional UB in mir-opt tests All of the changed mir-opt test input files did not pass Miri. Now they do. r? `@cjgillot` because there's a CopyProp test in here that I do not fully understand
Added another error to be processed in fallback This pull request addresses the problem of Rust not being able to read file/directory metadata because the current user doesn't have permission to read the file and are thus inaccessible. One particular example is `System Volume Information`. But any example can be made by having a file/directory, which the current user can't access even though the system does allow to view the metadata, which is handled by the fallback. The fallback exists to get the metadata but it was limited to one error type. Having added ERROR_ACCESS_DENIED per Chris Denton's suggestion, file/directory properties are now properly read. Solution suggested by Chris Denton nushell/nushell#6857 (comment)
Update books ## rust-lang/book 2 commits in f2a78f64b668f63f581203c6bac509903f7c00ee..d94e03a18a2590ed3f1c67b859cb11528d2a2d5c 2023-02-10 16:01:09 UTC to 2023-02-10 15:55:43 UTC - Update to Rust 1.67.1 - Update to Rust 1.66.1 ## rust-embedded/book 1 commits in f1a4614aa41cc544b91b79760a709e113f3451d7..701d1551429da4cb609082c0ac99df569e336710 2023-01-31 12:32:49 UTC to 2023-01-31 12:32:49 UTC - fix: Circled Image not visible on B&W E-Ink screen (rust-embedded/book#339) ## rust-lang/nomicon 2 commits in bd1829d235296952bf72ca55635e360584b8805e..79b53665a7c61d171fb8c5ad0b73b371f9ee6ba7 2023-02-13 08:40:24 UTC to 2023-02-07 09:43:03 UTC - Fixes double bug in Send-Sync example (rust-lang/nomicon#401) - Small language fix in subtyping.md (rust-lang/nomicon#399) ## rust-lang/reference 4 commits in 22882fb3f7b4d69fdc0d1731e8b9cfcb6910537d..e5adb99c04817b7fbe08f4ffce5b36702667345f 2023-02-08 18:09:03 UTC to 2023-02-01 03:49:46 UTC - Eliminate 'half open' terminology from range pattern grammar (rust-lang/reference#1330) - fix place expression context example (rust-lang/reference#1327) - remove confusing words (rust-lang/reference#1324) - Reword "expression for a match arm" (rust-lang/reference#1325) ## rust-lang/rust-by-example 5 commits in 134376872e8c387ef369507e0ee9b5a0e3272718..efe23c4fe12e06351b8dc8c3d18312c761455109 2023-02-06 11:32:23 UTC to 2023-01-31 16:38:03 UTC - fix irrelevant comments (rust-lang/rust-by-example#1676) - remove redudant code (rust-lang/rust-by-example#1675) - Line comments: change 'inside' to 'after' (rust-lang/rust-by-example#1674) - fix incorrect trait bound demonstration (rust-lang/rust-by-example#1673) - fix "High Order Functions" typo (rust-lang/rust-by-example#1672) ## rust-lang/rustc-dev-guide 14 commits in e359ee2..41a96ab 2023-02-11 06:41:56 UTC to 2023-01-31 18:42:30 UTC - Add a citation file (rust-lang/rustc-dev-guide#1550) - Improve git submodule help (rust-lang/rustc-dev-guide#1587) - update examples for rustc 1.69.0-nightly (e1eaa2d 2023-02-06) (rust-lang/rustc-dev-guide#1590) - Replace settings.json with x.py setup note (rust-lang/rustc-dev-guide#1588) - Do not add accept header on linkcheck (rust-lang/rustc-dev-guide#1586) - Fixed small grammar mistake in monomorph.md (rust-lang/rustc-dev-guide#1585) - update bootstrap guide (rust-lang/rustc-dev-guide#1583) - Use host symlink for custom rustup toolchain (rust-lang/rustc-dev-guide#1580) - Fix broken links (rust-lang/rustc-dev-guide#1577) - Add section on comparing types (rust-lang/rustc-dev-guide#1570) - Update rustfmt path (rust-lang/rustc-dev-guide#1574) - fix wrong heading level (rust-lang/rustc-dev-guide#1573) - fix incorrect position of `Clarification of build command's stdout` (rust-lang/rustc-dev-guide#1572) - extend bootstrap related documentations (rust-lang/rustc-dev-guide#1563)
…temtype, r=GuillaumeGomez rustdoc: use a string with one-character codes for search index types $ wc -c search-index.old.js search-index.new.js 3940530 search-index.old.js 3843222 search-index.new.js ((3940530-3843222)/3940530)*100 = 2.47% $ wc -c search-index.old.js.gz search-index.new.js.gz 380251 search-index.old.js.gz 379434 search-index.new.js.gz ((380251-379434)/380251)*100 = 0.214%
@bors r+ rollup=never p=8 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: 065852def0 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (5348a89): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesThis benchmark run did not return any relevant results for this metric. |
Successful merges:
impl
self types #107942 (Tighter spans for bad inherentimpl
self types)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup