-
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 10 pull requests #93173
Rollup of 10 pull requests #93173
Commits on Dec 31, 2021
-
Ensure that early-bound function lifetimes are always 'local'
During borrowchecking, we treat any free (early-bound) regions on the 'defining type' as `RegionClassification::External`. According to the doc comments, we should only have 'external' regions when checking a closure/generator. However, a plain function can also have some if its regions be considered 'early bound' - this occurs when the region is constrained by an argument, appears in a `where` clause, or in an opaque type. This was causing us to incorrectly mark these regions as 'external', which caused some diagnostic code to act as if we were referring to a 'parent' region from inside a closure. This PR marks all instantiated region variables as 'local' when we're borrow-checking something other than a closure/generator/inline-const.
Configuration menu - View commit details
-
Copy full SHA for e3a048c - Browse repository at this point
Copy the full SHA e3a048cView commit details
Commits on Jan 13, 2022
-
Improve error message for cfg arguments.
This provides the user with a helpful error message in case a key="value" message was specified but couldn't be parsed.
Configuration menu - View commit details
-
Copy full SHA for 90330b5 - Browse repository at this point
Copy the full SHA 90330b5View commit details -
Configuration menu - View commit details
-
Copy full SHA for db56c6d - Browse repository at this point
Copy the full SHA db56c6dView commit details -
Improve suggestions for type errors with string concatenation
Now, multipart suggestions are used instead of `span_to_snippet`, which improves code quality, makes the suggestion work even without access to source code, and, most importantly, improves the rendering of the suggestion.
Configuration menu - View commit details
-
Copy full SHA for 2835ace - Browse repository at this point
Copy the full SHA 2835aceView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69db5e2 - Browse repository at this point
Copy the full SHA 69db5e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 935a99a - Browse repository at this point
Copy the full SHA 935a99aView commit details -
This code is sufficiently complex -- I'm guessing due to the very long `match` guards -- that rustfmt doesn't format it.
Configuration menu - View commit details
-
Copy full SHA for 6e42bc3 - Browse repository at this point
Copy the full SHA 6e42bc3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5296bae - Browse repository at this point
Copy the full SHA 5296baeView commit details
Commits on Jan 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 32be348 - Browse repository at this point
Copy the full SHA 32be348View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1531d26 - Browse repository at this point
Copy the full SHA 1531d26View commit details -
Configuration menu - View commit details
-
Copy full SHA for af87248 - Browse repository at this point
Copy the full SHA af87248View commit details
Commits on Jan 18, 2022
-
Implement tuple array diagnostic
Co-authored-by: David Wood <Q0KPU0H1YOEPHRY1R2SN5B5RL@david.davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for ef46e38 - Browse repository at this point
Copy the full SHA ef46e38View commit details -
Configuration menu - View commit details
-
Copy full SHA for b2dd137 - Browse repository at this point
Copy the full SHA b2dd137View commit details
Commits on Jan 19, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7507fb6 - Browse repository at this point
Copy the full SHA 7507fb6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c4eca0 - Browse repository at this point
Copy the full SHA 7c4eca0View commit details
Commits on Jan 20, 2022
-
A number of trait implementations incorrectly claimed to be zero cost.
Configuration menu - View commit details
-
Copy full SHA for 7bc47cf - Browse repository at this point
Copy the full SHA 7bc47cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4de7618 - Browse repository at this point
Copy the full SHA 4de7618View commit details -
Configuration menu - View commit details
-
Copy full SHA for fdf930c - Browse repository at this point
Copy the full SHA fdf930cView commit details -
rustdoc: fix overflow-wrap for table layouts
For all table layouts, set overflow-wrap: break-word.
Configuration menu - View commit details
-
Copy full SHA for 9d178e5 - Browse repository at this point
Copy the full SHA 9d178e5View commit details
Commits on Jan 21, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b27d59d - Browse repository at this point
Copy the full SHA b27d59dView commit details -
allow excluding paths only from a single module
x.py has support for excluding some steps from the invocation, but unfortunately that's not granular enough: some steps have the same name in different modules, and that prevents excluding only *some* of them. As a practical example, let's say you need to run everything in `./x.py test` except for the standard library tests, as those tests require IPv6 and need to be executed on a separate machine. Before this commit, if you were to just run this: ./x.py test --exclude library/std ...the execution would fail, as that would not only exclude running the tests for the standard library, it would also exclude generating its documentation (breaking linkchecker). This commit adds support for an optional module annotation in --exclude paths, allowing the user to choose which module to exclude from: ./x.py test --exclude test::library/std This maintains backward compatibility, but also allows for more ganular exclusion. More examples on how this works: | `--exclude` | Docs | Tests | | ------------------- | ------- | ------- | | `library/std` | Skipped | Skipped | | `doc::library/std` | Skipped | Run | | `test::library/std` | Run | Skipped | Note that the new behavior only works in the `--exclude` flag, and not in other x.py arguments or flags yet.
Configuration menu - View commit details
-
Copy full SHA for b3ad405 - Browse repository at this point
Copy the full SHA b3ad405View commit details -
Rollup merge of rust-lang#91965 - ferrocene:pa-more-granular-exclude,…
… r=Mark-Simulacrum Add more granular `--exclude` in `x.py` x.py has support for excluding some steps from the current invocation, but unfortunately that's not granular enough: some steps have the same name in different modules, and that prevents excluding only *some* of them. As a practical example, let's say you need to run everything in `./x.py test` except for the standard library tests, as those tests require IPv6 and need to be executed on a separate machine. Before this commit, if you were to just run this: ./x.py test --exclude library/std ...the invocation would eventually fail, as that would not only exclude running the tests for the standard library (`library/std` in the `test` module), it would also exclude generating its documentation (`library/std` in the `doc` module), breaking linkchecker. This commit adds support to the `--exclude` flag for prefixing paths with the name of the module their step is defined in, allowing the user to choose which module to exclude from: ./x.py test --exclude test::library/std This maintains backward compatibility with existing invocations, while allowing more ganular exclusion. Examples of the behavior: | `--exclude` | Docs | Tests | | ------------------- | ------- | ------- | | `library/std` | Skipped | Skipped | | `doc::library/std` | Skipped | Run | | `test::library/std` | Run | Skipped | Note that this PR only changes the `--exclude` flag, and not in other `x.py` arguments or flags yet. In the implementation I tried to limit the impact this would have with rustbuild as a whole as much as possible. The module name is extracted from the step by parsing the result of `std::any::type_name()`: unfortunately that output can change at any point in time, but IMO it's better than having to annotate all the existing and future `Step` implementations with the module name. I added a test to ensure the parsing works as expected, so hopefully if anyone makes changes to the output of `std::any::type_name()` they'll also notice they have to update rustbuild. r? `@Mark-Simulacrum`
Configuration menu - View commit details
-
Copy full SHA for fc69406 - Browse repository at this point
Copy the full SHA fc69406View commit details -
Rollup merge of rust-lang#92467 - Aaron1011:extern-local-region, r=ol…
…i-obk Ensure that early-bound function lifetimes are always 'local' During borrowchecking, we treat any free (early-bound) regions on the 'defining type' as `RegionClassification::External`. According to the doc comments, we should only have 'external' regions when checking a closure/generator. However, a plain function can also have some if its regions be considered 'early bound' - this occurs when the region is constrained by an argument, appears in a `where` clause, or in an opaque type. This was causing us to incorrectly mark these regions as 'external', which caused some diagnostic code to act as if we were referring to a 'parent' region from inside a closure. This PR marks all instantiated region variables as 'local' when we're borrow-checking something other than a closure/generator/inline-const.
Configuration menu - View commit details
-
Copy full SHA for 10c9ec3 - Browse repository at this point
Copy the full SHA 10c9ec3View commit details -
Rollup merge of rust-lang#92586 - esp-rs:bugfix/allocation-alignment-…
…espidf, r=yaahc Set the allocation MIN_ALIGN for espidf to 4. Closes esp-rs#99. cc: `@ivmarkov`
Configuration menu - View commit details
-
Copy full SHA for 701a833 - Browse repository at this point
Copy the full SHA 701a833View commit details -
Rollup merge of rust-lang#92835 - iwanders:issue-66450-improve-cfg-er…
…ror-message, r=nagisa Improve error message for key="value" cfg arguments. Hi, I ran into difficulties using the `--cfg` flag syntax, first hit when googling for the error was issue rust-lang#66450. Reading that issue, it sounded like the best way to improve the experience was to improve the error message, this is low risk and doesn't introduce any additional argument parsing. The issue mentions that it is entirely dependent on the shell, while this may be true, I think guiding the the user into the realization that the quotes may need to be escaped is helpful. The two suggested escapings both work in Bash and in the Windows command prompt. fyi `@ehuss`
Configuration menu - View commit details
-
Copy full SHA for e38cbc7 - Browse repository at this point
Copy the full SHA e38cbc7View commit details -
Rollup merge of rust-lang#92843 - camelid:str-concat-sugg, r=davidtwco
Improve string concatenation suggestion Before: error[E0369]: cannot add `&str` to `&str` --> file.rs:2:22 | 2 | let _x = "hello" + " world"; | ------- ^ -------- &str | | | | | `+` cannot be used to concatenate two `&str` strings | &str | help: `to_owned()` can be used to create an owned `String` from a string reference. String concatenation appends the string on the right to the string on the left and may require reallocation. This requires ownership of the string on the left | 2 | let _x = "hello".to_owned() + " world"; | ~~~~~~~~~~~~~~~~~~ After: error[E0369]: cannot add `&str` to `&str` --> file.rs:2:22 | 2 | let _x = "hello" + " world"; | ------- ^ -------- &str | | | | | `+` cannot be used to concatenate two `&str` strings | &str | = note: string concatenation requires an owned `String` on the left help: create an owned `String` from a string reference | 2 | let _x = "hello".to_owned() + " world"; | +++++++++++
Configuration menu - View commit details
-
Copy full SHA for 430673f - Browse repository at this point
Copy the full SHA 430673fView commit details -
Rollup merge of rust-lang#92963 - terrarier2111:tuple-diagnostic, r=d…
…avidtwco Implement tuple array diagnostic Fixes rust-lang#92089
Configuration menu - View commit details
-
Copy full SHA for 1f3a2dd - Browse repository at this point
Copy the full SHA 1f3a2ddView commit details -
Rollup merge of rust-lang#93046 - est31:let_else, r=davidtwco
Use let_else in even more places Followup of rust-lang#89933, rust-lang#91018, rust-lang#91481.
Configuration menu - View commit details
-
Copy full SHA for ab19d4a - Browse repository at this point
Copy the full SHA ab19d4aView commit details -
Rollup merge of rust-lang#93109 - JakobDegen:arc-docs, r=m-ou-se
Improve `Arc` and `Rc` documentation This makes two changes (I can split the PR if necessary, but the changes are pretty small): 1. A bunch of trait implementations claimed to be zero cost; however, they use the `Arc<T>: From<Box<T>>` impl which is definitely not free, especially for large dynamically sized `T`. 2. The code in deferred initialization examples unnecessarily used excessive amounts of `unsafe`. This has been reduced.
Configuration menu - View commit details
-
Copy full SHA for 9474c74 - Browse repository at this point
Copy the full SHA 9474c74View commit details -
Rollup merge of rust-lang#93134 - tlyu:delete-stdin-split, r=Amanieu
delete `Stdin::split` forwarder Part of rust-lang#87096. Delete the `Stdin::split` forwarder because it's seen as too niche to expose at this level. `@rustbot` label T-libs-api A-io
Configuration menu - View commit details
-
Copy full SHA for 081d65f - Browse repository at this point
Copy the full SHA 081d65fView commit details -
Rollup merge of rust-lang#93139 - jsha:fix-wrapped-names, r=Nemo157
rustdoc: fix overflow-wrap for table layouts For all table layouts, set overflow-wrap: break-word. Fixes rust-lang#93135 Demo: https://rustdoc.crud.net/jsha/fix-wrapped-names/std/intrinsics/index.html#functions (Compare vs https://doc.rust-lang.org/nightly/std/intrinsics/index.html - you may have to make your browser narrower to see the effect) r? `@Nemo157`
Configuration menu - View commit details
-
Copy full SHA for 26e9357 - Browse repository at this point
Copy the full SHA 26e9357View commit details