-
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 12 pull requests #91469
Rollup of 12 pull requests #91469
Commits on Nov 26, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 2a83c11 - Browse repository at this point
Copy the full SHA 2a83c11View commit details
Commits on Nov 28, 2021
-
Fix incorrect usage of
EvaluatedToOk
when evaluatingTypeOutlives
A global predicate is not guarnatenteed to outlive all regions. If the predicate involves late-bound regions, then it may fail to outlive other regions (e.g. `for<'b> &'b bool: 'static` does not hold) We now only produce `EvaluatedToOk` when a global predicate has no late-bound regions - in that case, the ony region that can be present in the type is 'static
Configuration menu - View commit details
-
Copy full SHA for 4910fe6 - Browse repository at this point
Copy the full SHA 4910fe6View commit details
Commits on Nov 29, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 821b92b - Browse repository at this point
Copy the full SHA 821b92bView commit details
Commits on Nov 30, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 7907fa8 - Browse repository at this point
Copy the full SHA 7907fa8View commit details
Commits on Dec 1, 2021
-
Separate
RemoveFalseEdges
fromSimplifyBranches
Otherwise dataflow state will propagate along false edges and cause things to be marked as maybe init unnecessarily. These should be separate, since `SimplifyBranches` also makes `if true {} else {}` into a `goto`, which means we wouldn't lint anything in the `else` block.
Configuration menu - View commit details
-
Copy full SHA for bb27b05 - Browse repository at this point
Copy the full SHA bb27b05View commit details -
Configuration menu - View commit details
-
Copy full SHA for d707707 - Browse repository at this point
Copy the full SHA d707707View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f7605b - Browse repository at this point
Copy the full SHA 4f7605bView commit details -
Add rationale for
RemoveUnneededDrops
...since its name is very close to `RemoveUninitDrops`.
Configuration menu - View commit details
-
Copy full SHA for ce2959d - Browse repository at this point
Copy the full SHA ce2959dView commit details -
Handle
DropAndReplace
in const-checkingIt runs before the real drop elaboration pass.
Configuration menu - View commit details
-
Copy full SHA for 3e0e8be - Browse repository at this point
Copy the full SHA 3e0e8beView commit details -
Move post-elaboration const-checking earlier in the pipeline
Instead we run `RemoveFalseEdges` and `RemoveUninitDrops` at the appropriate time. The extra `SimplifyCfg` avoids visiting unreachable blocks during `RemoveUninitDrops`.
Configuration menu - View commit details
-
Copy full SHA for 58c996c - Browse repository at this point
Copy the full SHA 58c996cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9aaca1d - Browse repository at this point
Copy the full SHA 9aaca1dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 37fa925 - Browse repository at this point
Copy the full SHA 37fa925View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba7374e - Browse repository at this point
Copy the full SHA ba7374eView commit details
Commits on Dec 2, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b11d880 - Browse repository at this point
Copy the full SHA b11d880View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd8d7e4 - Browse repository at this point
Copy the full SHA bd8d7e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5c75a48 - Browse repository at this point
Copy the full SHA 5c75a48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 51875e3 - Browse repository at this point
Copy the full SHA 51875e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b77ed83 - Browse repository at this point
Copy the full SHA b77ed83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6df44a3 - Browse repository at this point
Copy the full SHA 6df44a3View commit details -
Configuration menu - View commit details
-
Copy full SHA for d883242 - Browse repository at this point
Copy the full SHA d883242View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66153d7 - Browse repository at this point
Copy the full SHA 66153d7View commit details -
Rollup merge of rust-lang#89954 - GuillaumeGomez:legacy-const-generic…
…-doc, r=Amanieu Fix legacy_const_generic doc arguments display Fixes rust-lang#83167. cc ``@Amanieu``
Configuration menu - View commit details
-
Copy full SHA for 444635d - Browse repository at this point
Copy the full SHA 444635dView commit details -
Rollup merge of rust-lang#91321 - matthewjasper:constaint-placeholder…
…s, r=jackh726 Handle placeholder regions in NLL type outlive constraints Closes rust-lang#76168
Configuration menu - View commit details
-
Copy full SHA for b56e3d9 - Browse repository at this point
Copy the full SHA b56e3d9View commit details -
Rollup merge of rust-lang#91329 - Aaron1011:modulo-regions-test, r=ja…
…ckh726 Fix incorrect usage of `EvaluatedToOk` when evaluating `TypeOutlives` A global predicate is not guarnatenteed to outlive all regions. If the predicate involves late-bound regions, then it may fail to outlive other regions (e.g. `for<'b> &'b bool: 'static` does not hold) We now only produce `EvaluatedToOk` when a global predicate has no late-bound regions - in that case, the ony region that can be present in the type is 'static
Configuration menu - View commit details
-
Copy full SHA for fd6e66f - Browse repository at this point
Copy the full SHA fd6e66fView commit details -
Rollup merge of rust-lang#91364 - FabianWolff:issue-91210-ptr-field, …
…r=oli-obk Improve error message for incorrect field accesses through raw pointers Fixes rust-lang#91210.
Configuration menu - View commit details
-
Copy full SHA for 7483211 - Browse repository at this point
Copy the full SHA 7483211View commit details -
Rollup merge of rust-lang#91387 - graydon:E0038-clarification, r=wesl…
…eywiser Clarify and tidy up explanation of E0038 I ran into E0038 (specifically the `Self:Sized` constraint on object-safety) the other day and it seemed to me that the explanations I found floating around the internet were a bit .. wrong. Like they didn't make sense. And then I went and checked the official explanation here and it didn't make sense either. As far as I can tell (reading through the history of the RFCs), two totally different aspects of object-safety have got tangled up in much of the writing on the subject: - Object-safety related to "not even theoretically possible" issues. This includes things like "methods that take or return Self by value", which obviously will never work for an unsized type in a world with fixed-size stack frames (and it'd be an opaque type anyways, which, ugh). This sort of thing was originally decided method-by-method, with non-object-safe methods stripped from objects; but in [RFC 0255](https://rust-lang.github.io/rfcs/0255-object-safety.html) this sort of per-impossible-method reasoning was made into a per-trait safety property (with the escape hatch left in where users could mark methods `where Self:Sized` to have them stripped before the trait's object safety is considered). - Object-safety related to "totally possible but ergonomically a little awkward" issues. Specifically in a trait with `Trait:Sized`, there's no a priori reason why this constraint makes the trait impossible to make into an object -- imagine it had nothing but harmless `&self`-taking methods. No problem! Who cares if the Trait requires its implementing types to be sized? As far as I can tell reading the history here, in both RFC 0255 and then later in [RFC 0546](https://rust-lang.github.io/rfcs/0546-Self-not-sized-by-default.html) it seems that the motivation for making `Trait:Sized` be non-object-safe has _nothing to do_ with the impossibility of making objects out of such types, and everything to do with enabling "[a trait object SomeTrait to implement the trait SomeTrait](https://rust-lang.github.io/rfcs/0546-Self-not-sized-by-default.html#motivation)". That is, since `dyn Trait` is unsized, if `Trait:Sized` then you can never have the automatic (and reasonable) ergonomic implicit `impl Trait for dyn Trait`. And the authors of that RFC really wanted that automatic implicit implementation of `Trait` for `dyn Trait`. So they just defined `Trait:Sized` as non-object safe -- no `dyn Trait` can ever exist that the compiler can't synthesize such an impl for. Well enough! However, I noticed in my reading-and-reconstruction that lots of documentation on the internet, including forum and Q&A site answers and (most worrying) the compiler explanation all kinda grasp at something like the first ("not theoretically possible") explanation, and fail to mention the second ("just an ergonomic constraint") explanation. So I figured I'd clean up the docs to clarify, maybe confuse the next person less (unless of course I'm misreading the history here and misunderstanding motives -- please let me know if so!) While here I also did some cleanups: - Rewrote the preamble, trying to help the user get a little better oriented (I found the existing preamble a bit scattered). - Modernized notation (using `dyn Trait`) - Changed the section headings to all be written with the same logical sense: to all be written as "conditions that violate object safety" rather than a mix of that and the negated form "conditions that must not happen in order to ensure object safety". I think there's a fair bit more to clean up in this doc -- the later sections get a bit rambly and I suspect there should be a completely separated-out section covering the `where Self:Sized` escape hatch for instructing the compiler to "do the old thing" and strip methods off traits when turning them into objects (it's a bit buried as a digression in the individual sub-error sections). But I did what I had time for now.
Configuration menu - View commit details
-
Copy full SHA for b269213 - Browse repository at this point
Copy the full SHA b269213View commit details -
Rollup merge of rust-lang#91410 - ecstatic-morse:const-precise-live-d…
…rops-take-2, r=oli-obk Move `#![feature(const_precise_live_drops)]` checks earlier in the pipeline Should mitigate the issues found during MCP on rust-lang#73255. Once this is done, we should clean up the queries a bit, since I think `mir_drops_elaborated_and_const_checked` can be merged back into `mir_promoted`. Fixes rust-lang#90770. cc ``@rust-lang/wg-const-eval`` r? ``@nikomatsakis`` (since they reviewed rust-lang#71824)
Configuration menu - View commit details
-
Copy full SHA for 3964131 - Browse repository at this point
Copy the full SHA 3964131View commit details -
Rollup merge of rust-lang#91435 - FabianWolff:issue-91421-if-then, r=…
…lcnr Improve diagnostic for missing half of binary operator in `if` condition Fixes rust-lang#91421. I've also changed it so that it doesn't consume the `else` token in the error case, because it will try to consume it again afterwards, leading to this incorrect error message (where the `else` reported as missing is actually there): ``` error: expected one of `.`, `;`, `?`, `else`, or an operator, found `{` --> src/main.rs:4:12 | 4 | } else { 4 }; | ^ expected one of `.`, `;`, `?`, `else`, or an operator ``` r? `@lcnr`
Configuration menu - View commit details
-
Copy full SHA for dbb9e22 - Browse repository at this point
Copy the full SHA dbb9e22View commit details -
Rollup merge of rust-lang#91444 - RalfJung:miri-tests, r=dtolnay
disable tests in Miri that take too long Comparing slices of length `usize::MAX` diverges in Miri. In fact these tests even diverge in rustc unless `-O` is passed. I tried this code to check that: ```rust #![feature(slice_take)] const EMPTY_MAX: &'static [()] = &[(); usize::MAX]; fn main() { let mut slice: &[_] = &[(); usize::MAX]; println!("1"); assert_eq!(Some(&[] as _), slice.take(usize::MAX..)); println!("2"); let remaining: &[_] = EMPTY_MAX; println!("3"); assert_eq!(remaining, slice); println!("4"); } ``` So, disable these tests in Miri for now.
Configuration menu - View commit details
-
Copy full SHA for fbfa003 - Browse repository at this point
Copy the full SHA fbfa003View commit details -
Rollup merge of rust-lang#91457 - steffahn:additional_test_from_91068…
…, r=jackh726 Add additional test from rust issue number 91068 see rust-lang#91068 r? ``@jackh726``
Configuration menu - View commit details
-
Copy full SHA for d5fc7cf - Browse repository at this point
Copy the full SHA d5fc7cfView commit details -
Rollup merge of rust-lang#91460 - ChrisDenton:doc-last-os-error, r=jo…
…shtriplett Document how `last_os_error` should be used It should be made clear that the state of the last OS error could change if another function call is made before the call to `Error::last_os_error()`. Fixes: rust-lang#53155
Configuration menu - View commit details
-
Copy full SHA for 2ec0f84 - Browse repository at this point
Copy the full SHA 2ec0f84View commit details -
Rollup merge of rust-lang#91464 - ChrisDenton:doc-path-case-sensitivi…
…ty, r=joshtriplett Document file path case sensitivity This describes the current behaviour of the standard library's pure path methods. Fixes rust-lang#66260.
Configuration menu - View commit details
-
Copy full SHA for 6e5f4c2 - Browse repository at this point
Copy the full SHA 6e5f4c2View commit details -
Rollup merge of rust-lang#91466 - nnethercote:Symbol-interner-comment…
…s, r=Mark-Simulacrum Improve the comments in `Symbol::interner`. r? `@Mark-Simulacrum`
Configuration menu - View commit details
-
Copy full SHA for f7afd46 - Browse repository at this point
Copy the full SHA f7afd46View commit details