-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #116855
Rollup of 5 pull requests #116855
Commits on Oct 13, 2023
-
MCP636: Add simpler and more explicit syntax to check-cfg
This add a new form and deprecated the other ones: - cfg(name1, ..., nameN, values("value1", "value2", ... "valueN")) - cfg(name1, ..., nameN) or cfg(name1, ..., nameN, values()) - cfg(any()) It also changes the default exhaustiveness to be enable-by-default in the presence of any --check-cfg arguments.
Configuration menu - View commit details
-
Copy full SHA for e5e95eb - Browse repository at this point
Copy the full SHA e5e95ebView commit details -
Configuration menu - View commit details
-
Copy full SHA for fc78d78 - Browse repository at this point
Copy the full SHA fc78d78View commit details
Commits on Oct 14, 2023
-
Special case iterator chain checks for suggestion
When encountering method call chains of `Iterator`, check for trailing `;` in the body of closures passed into `Iterator::map`, as well as calls to `<T as Clone>::clone` when `T` is a type param and `T: !Clone`. Fix rust-lang#9082.
Configuration menu - View commit details
-
Copy full SHA for 6d23ee8 - Browse repository at this point
Copy the full SHA 6d23ee8View commit details
Commits on Oct 16, 2023
-
Add MonoItems and Instance to stable_mir
Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body.
Configuration menu - View commit details
-
Copy full SHA for 364f1a3 - Browse repository at this point
Copy the full SHA 364f1a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 26954f6 - Browse repository at this point
Copy the full SHA 26954f6View commit details
Commits on Oct 17, 2023
-
Configuration menu - View commit details
-
Copy full SHA for b0e1a52 - Browse repository at this point
Copy the full SHA b0e1a52View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8769e02 - Browse repository at this point
Copy the full SHA 8769e02View commit details -
Configuration menu - View commit details
-
Copy full SHA for f77dea8 - Browse repository at this point
Copy the full SHA f77dea8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5895102 - Browse repository at this point
Copy the full SHA 5895102View commit details -
Configuration menu - View commit details
-
Copy full SHA for 52ad819 - Browse repository at this point
Copy the full SHA 52ad819View commit details -
Configuration menu - View commit details
-
Copy full SHA for e89d4d4 - Browse repository at this point
Copy the full SHA e89d4d4View commit details -
Rollup merge of rust-lang#111072 - Urgau:check-cfg-new-syntax, r=petr…
…ochenkov Add new simpler and more explicit syntax for check-cfg <details> <summary> Old proposition (before the MCP) </summary> This PR adds a new simpler and more explicit syntax for check-cfg. It consist of two new form: - `exhaustive(names, values)` - `configure(name, "value1", "value2", ... "valueN")` The preview forms `names(...)` and `values(...)` have implicit meaning that are not strait-forward. In particular `values(foo)`&`values(bar)` and `names(foo, bar)` are not equivalent which has created [some confusions](rust-lang#98080). Also the `names()` and `values()` form are not clear either and again created some confusions where peoples believed that `values()`&`values(foo)` could be reduced to just `values(foo)`. To fix that the two new forms are made to be explicit and simpler. See the table of correspondence: - `names()` -> `exhaustive(names)` - `values()` -> `exhaustive(values)` - `names(foo)` -> `exhaustive(names)`&`configure(foo)` - `values(foo)` -> `configure(foo)` - `values(feat, "foo", "bar")` -> `configure(feat, "foo", "bar")` - `values(foo)`&`values(bar)` -> `configure(foo, bar)` - `names()`&`values()`&`values(my_cfg)` -> `exhaustive(names, values)`&`configure(my_cfg)` Another benefits of the new syntax is that it allow for further options (like conditional checking for --cfg, currently always on) without syntax change. The two previous forms are deprecated and will be removed once cargo and beta rustc have the necessary support. </details> This PR is the first part of the implementation of [MCP636 - Simplify and improve explicitness of the check-cfg syntax](rust-lang/compiler-team#636). ## New `cfg` form It introduces the new [`cfg` form](rust-lang/compiler-team#636) and deprecate the other two: ``` rustc --check-cfg 'cfg(name1, ..., nameN, values("value1", "value2", ... "valueN"))' ``` ## Default built-in names and values It also changes the default for the built-in names and values checking. - Built-in values checking would always be activated as long as a `--check-cfg` argument is present - Built-in names checking would always be activated as long as a `--check-cfg` argument is present **unless** if any `cfg(any())` arg is passed ~~**Note: depends on rust-lang#111068 but is reviewable (last two commits)!**~~ Resolve rust-lang/compiler-team#636 r? `@petrochenkov`
Configuration menu - View commit details
-
Copy full SHA for ce40742 - Browse repository at this point
Copy the full SHA ce40742View commit details -
Rollup merge of rust-lang#116717 - estebank:issue-9082, r=oli-obk
Special case iterator chain checks for suggestion When encountering method call chains of `Iterator`, check for trailing `;` in the body of closures passed into `Iterator::map`, as well as calls to `<T as Clone>::clone` when `T` is a type param and `T: !Clone`. Fix rust-lang#9082.
Configuration menu - View commit details
-
Copy full SHA for a5aa52c - Browse repository at this point
Copy the full SHA a5aa52cView commit details -
Rollup merge of rust-lang#116719 - celinval:smir-mono, r=oli-obk
Add MonoItems and Instance to stable_mir Also add a few methods to instantiate instances and get an instance definition. We're still missing support to actually monomorphize the instance body. This is related to rust-lang/project-stable-mir#36 r? ``@oli-obk`` ``@oli-obk`` is that what you were thinking? I incorporated ``@bjorn3`` idea of just adding a Shim instance definition in rust-lang#116465.
Configuration menu - View commit details
-
Copy full SHA for 00f529d - Browse repository at this point
Copy the full SHA 00f529dView commit details -
Rollup merge of rust-lang#116787 - a-lafrance:span-internal-lint, r=o…
…li-obk Implement an internal lint encouraging use of `Span::eq_ctxt` Adds a new Rustc internal lint that forbids use of `.ctxt() == .ctxt()` for spans, encouraging use of `.eq_ctxt()` instead (see rust-lang#49509). Also fixed a few violations of the lint in the Rustc codebase (a fun additional way I could test my code). Edit: MIR opt folks I believe that's why you're CC'ed, just a heads up. Two things I'm not sure about: 1. The way I chose to detect calls to `Span::ctxt`. I know adding diagnostic items to methods is generally discouraged, but after some searching and experimenting I couldn't find anything else that worked, so I went with it. That said, I'm happy to implement something different if there's a better way out there. (For what it's worth, if there is a better way, it might be worth documenting in the rustc-dev-guide, which I'm happy to take care of) 2. The error message for the lint. Ideally it would probably be good to give some context as to why the suggestion is made (e.g. `rustc::default_hash_types` tells the user that it's because of performance), but I don't have that context so I couldn't put it in the error message. Happy to iterate on the error message based on feedback during review. r? ``@oli-obk``
Configuration menu - View commit details
-
Copy full SHA for 3ea438e - Browse repository at this point
Copy the full SHA 3ea438eView commit details -
Rollup merge of rust-lang#116827 - nnethercote:pub-handle_options, r=…
…compiler-errors Make `handle_options` public again. r? ``@compiler-errors``
Configuration menu - View commit details
-
Copy full SHA for 6e6cd68 - Browse repository at this point
Copy the full SHA 6e6cd68View commit details