-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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 5 pull requests #128169
Rollup of 5 pull requests #128169
Commits on Jul 10, 2024
-
Configuration menu - View commit details
-
Copy full SHA for e844581 - Browse repository at this point
Copy the full SHA e844581View commit details -
Configuration menu - View commit details
-
Copy full SHA for 32c8bfd - Browse repository at this point
Copy the full SHA 32c8bfdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 898ed2f - Browse repository at this point
Copy the full SHA 898ed2fView commit details
Commits on Jul 11, 2024
-
Configuration menu - View commit details
-
Copy full SHA for de88bc5 - Browse repository at this point
Copy the full SHA de88bc5View commit details
Commits on Jul 12, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 79d1ac6 - Browse repository at this point
Copy the full SHA 79d1ac6View commit details
Commits on Jul 18, 2024
-
Replace ASCII control chars with Unicode Control Pictures
``` error: bare CR not allowed in doc-comment --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32 | LL | /// doc comment with bare CR: '␍' | ^ ```
Configuration menu - View commit details
-
Copy full SHA for 89f273f - Browse repository at this point
Copy the full SHA 89f273fView commit details -
Be more accurate about calculating
display_col
from aBytePos
No longer track "zero-width" chars in `SourceMap`, read directly from the line when calculating the `display_col` of a `BytePos`. Move `char_width` to `rustc_span` and use it from the emitter. This change allows the following to properly align in terminals (depending on the font, the replaced control codepoints are rendered as 1 or 2 width, on my terminal they are rendered as 1, on VSCode text they are rendered as 2): ``` error: this file contains an unclosed delimiter --> $DIR/issue-68629.rs:5:17 | LL | ␜␟ts␀![{i | -- unclosed delimiter | | | unclosed delimiter LL | ␀␀ fn rݻoa>rݻm | ^ ```
Configuration menu - View commit details
-
Copy full SHA for 2d7795d - Browse repository at this point
Copy the full SHA 2d7795dView commit details -
Make unicode text flow control chars visible as �
We already point these out quite aggressively, telling people not to use them, but would normally be rendered as nothing. Having them visible will make it easier for people to actually deal with them. ``` error: unicode codepoint changing visible direction of text present in literal --> $DIR/unicode-control-codepoints.rs:26:22 | LL | println!("{:?}", '�'); | ^-^ | || | |'\u{202e}' | this literal contains an invisible unicode text flow control codepoint | = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | LL | println!("{:?}", '\u{202e}'); | ~~~~~~~~ ``` vs the previous ``` error: unicode codepoint changing visible direction of text present in literal --> $DIR/unicode-control-codepoints.rs:26:22 | LL | println!("{:?}", ''); | ^- | || | |'\u{202e}' | this literal contains an invisible unicode text flow control codepoint | = note: these kind of unicode codepoints change the way text flows on applications that support them, but can cause confusion because they change the order of characters on the screen = help: if their presence wasn't intentional, you can remove them help: if you want to keep them but make them visible in your source code, you can escape them | LL | println!("{:?}", '\u{202e}'); | ~~~~~~~~ ```
Configuration menu - View commit details
-
Copy full SHA for 9dffe95 - Browse repository at this point
Copy the full SHA 9dffe95View commit details
Commits on Jul 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for ef07fe1 - Browse repository at this point
Copy the full SHA ef07fe1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63286d8 - Browse repository at this point
Copy the full SHA 63286d8View commit details
Commits on Jul 23, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 710e7b0 - Browse repository at this point
Copy the full SHA 710e7b0View commit details
Commits on Jul 24, 2024
-
We don't want to have questions in the diagnostic output. Instead, we use wording that communicates uncertainty, like "might": ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ you might be missing crate `spam` | = help: consider adding `extern crate spam` to use the `spam` crate ```
Configuration menu - View commit details
-
Copy full SHA for 850faea - Browse repository at this point
Copy the full SHA 850faeaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bd7680 - Browse repository at this point
Copy the full SHA 9bd7680View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0919d07 - Browse repository at this point
Copy the full SHA 0919d07View commit details
Commits on Jul 25, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 7da751a - Browse repository at this point
Copy the full SHA 7da751aView commit details -
Rollup merge of rust-lang#127054 - compiler-errors:bound-ordering, r=…
…fmease Reorder trait bound modifiers *after* `for<...>` binder in trait bounds This PR suggests changing the grammar of trait bounds from: ``` [CONSTNESS] [ASYNCNESS] [?] [BINDER] [TRAIT_PATH] const async ? for<'a> Sized ``` to ``` ([BINDER] [CONSTNESS] [ASYNCNESS] | [?]) [TRAIT_PATH] ``` i.e., either ``` ? Sized ``` or ``` for<'a> const async Sized ``` (but not both) ### Why? I think it's strange that the binder applies "more tightly" than the `?` trait polarity. This becomes even weirder when considering that we (or at least, I) want to have `async` trait bounds expressed like: ``` where T: for<'a> async Fn(&'a ()) -> i32, ``` and not: ``` where T: async for<'a> Fn(&'a ()) -> i32, ``` ### Fallout No crates on crater use this syntax, presumably because it's literally useless. This will require modifying the reference grammar, though. ### Alternatives If this is not desirable, then we can alternatively keep parsing `for<'a>` after the `?` but deprecate it with either an FCW (or an immediate hard error), and begin parsing `for<'a>` *before* the `?`.
Configuration menu - View commit details
-
Copy full SHA for cfc5f25 - Browse repository at this point
Copy the full SHA cfc5f25View commit details -
Rollup merge of rust-lang#127528 - estebank:ascii-control-chars, r=ol…
…i-obk Replace ASCII control chars with Unicode Control Pictures Replace ASCII control chars like `CR` with Unicode Control Pictures like `␍`: ``` error: bare CR not allowed in doc-comment --> $DIR/lex-bare-cr-string-literal-doc-comment.rs:3:32 | LL | /// doc comment with bare CR: '␍' | ^ ``` Centralize the checking of unicode char width for the purposes of CLI display in one place. Account for the new replacements. Remove unneeded tracking of "zero-width" unicode chars, as we calculate these in the `SourceMap` as needed now.
Configuration menu - View commit details
-
Copy full SHA for cce2db0 - Browse repository at this point
Copy the full SHA cce2db0View commit details -
Rollup merge of rust-lang#127872 - Oneirical:antestral-traditions, r=…
…jieyouxu Migrate `pointer-auth-link-with-c`, `c-dynamic-rlib` and `c-dynamic-dylib` `run-make` tests to rmake Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). Please try: try-job: x86_64-msvc try-job: i686-mingw try-job: aarch64-apple
Configuration menu - View commit details
-
Copy full SHA for 04e4569 - Browse repository at this point
Copy the full SHA 04e4569View commit details -
Rollup merge of rust-lang#128111 - estebank:no-question, r=fmease
Do not use question as label We don't want to have questions in the diagnostic output. Instead, we use wording that communicates uncertainty, like "might": ``` error[E0432]: unresolved import `spam` --> $DIR/import-from-missing-star-3.rs:2:9 | LL | use spam::*; | ^^^^ you might be missing crate `spam` | = help: consider adding `extern crate spam` to use the `spam` crate ```
Configuration menu - View commit details
-
Copy full SHA for 40557c8 - Browse repository at this point
Copy the full SHA 40557c8View commit details -
Rollup merge of rust-lang#128160 - compiler-errors:auto, r=jackh726
Don't ICE when auto trait has assoc ty in old solver Kinda a pointless change to make, but it's observable w/o the feature gate, so let's just fix it. I reintroduced this ICE when I removed the "auto impl" kind from `ImplSource` in rust-lang#112687. Fixes rust-lang#117829 Fixes rust-lang#127746
Configuration menu - View commit details
-
Copy full SHA for 1fda084 - Browse repository at this point
Copy the full SHA 1fda084View commit details