-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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 6 pull requests #73654
Rollup of 6 pull requests #73654
Commits on May 30, 2020
-
Configuration menu - View commit details
-
Copy full SHA for b97487b - Browse repository at this point
Copy the full SHA b97487bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2d6267a - Browse repository at this point
Copy the full SHA 2d6267aView commit details
Commits on Jun 19, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 8fc2eeb - Browse repository at this point
Copy the full SHA 8fc2eebView commit details -
Look for stores between non-conflicting generator saved locals
This is to prevent the miscompilation in rust-lang#73137 from reappearing. Only runs with `-Zvalidate-mir`.
Configuration menu - View commit details
-
Copy full SHA for c178e64 - Browse repository at this point
Copy the full SHA c178e64View commit details -
Incorporate review suggestions
Co-authored-by: Tyler Mandry <tmandry@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for b2ec645 - Browse repository at this point
Copy the full SHA b2ec645View commit details
Commits on Jun 20, 2020
-
Fix -Z unpretty=everybody_loops
It turns out that this has not been working for who knows how long. Previously: ``` pub fn h() { 1 + 2; } ``` After this change: ``` pub fn h() { loop {} } ``` This only affected the pass when run with the command line pretty-printing option, so rustdoc was still replacing bodies with `loop {}`.
Configuration menu - View commit details
-
Copy full SHA for 95f8daa - Browse repository at this point
Copy the full SHA 95f8daaView commit details
Commits on Jun 21, 2020
-
lints: add
improper_ctypes_definitions
This commit adds a new lint - `improper_ctypes_definitions` - which functions identically to `improper_ctypes`, but on `extern "C" fn` definitions (as opposed to `improper_ctypes`'s `extern "C" {}` declarations). Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for f05c6db - Browse repository at this point
Copy the full SHA f05c6dbView commit details -
improper_ctypes: allow pointers to sized types
This commit changes the improper ctypes lint (when operating on definitions) to consider raw pointers or references to sized types as FFI-safe. Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for 08be0e8 - Browse repository at this point
Copy the full SHA 08be0e8View commit details -
improper_ctypes: only allow params in defns mode
This commit adjusts the behaviour introduced in a previous commit so that generic parameters and projections are only allowed in the definitions mode - and are otherwise a bug. Generic parameters in declarations are prohibited earlier in the compiler, so if that branch were reached, it would be a bug. Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for 3e94136 - Browse repository at this point
Copy the full SHA 3e94136View commit details
Commits on Jun 23, 2020
-
Change heuristic for determining range literal
Currently, rustc uses a heuristic to determine if a range expression is not a literal based on whether the expression looks like a function call or struct initialization. This fails for range literals whose lower/upper bounds are the results of function calls. A possibly-better heuristic is to check if the expression contains `..`, required in range literals. Of course, this is also not perfect; for example, if the range expression is a struct which includes some text with `..` this will fail, but in general I believe it is a better heuristic. A better alternative altogether is to add the `QPath::LangItem` enum variant suggested in rust-lang#60607. I would be happy to do this as a precursor to this patch if someone is able to provide general suggestions on how usages of `QPath` need to be changed later in the compiler with the `LangItem` variant. Closes rust-lang#73553
Configuration menu - View commit details
-
Copy full SHA for 7930f9a - Browse repository at this point
Copy the full SHA 7930f9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bb882d7 - Browse repository at this point
Copy the full SHA bb882d7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 43ef554 - Browse repository at this point
Copy the full SHA 43ef554View commit details -
Configuration menu - View commit details
-
Copy full SHA for e817cd2 - Browse repository at this point
Copy the full SHA e817cd2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 814782b - Browse repository at this point
Copy the full SHA 814782bView commit details -
Rollup merge of rust-lang#72700 - davidtwco:issue-66220-improper-ctyp…
…es-declarations, r=lcnr,varkor `improper_ctypes_definitions` lint Addresses rust-lang#19834, rust-lang#66220, and rust-lang#66373. This PR takes another attempt at rust-lang#65134 (reverted in rust-lang#66378). Instead of modifying the existing `improper_ctypes` lint to consider `extern "C" fn` definitions in addition to `extern "C" {}` declarations, this PR adds a new lint - `improper_ctypes_definitions` - which only applies to `extern "C" fn` definitions. In addition, the `improper_ctype_definitions` lint differs from `improper_ctypes` by considering `*T` and `&T` (where `T: Sized`) FFI-safe (addressing rust-lang#66220). There wasn't a clear consensus in rust-lang#66220 (where the issues with rust-lang#65134 were primarily discussed) on the approach to take, but there has [been some discussion in Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/.2366220.20improper_ctypes.20definitions.20vs.20declarations/near/198903086). I fully expect that we'll want to iterate on this before landing. cc @varkor + @shepmaster (from rust-lang#19834) @hanna-kruppe (active in discussing rust-lang#66220), @SimonSapin (rust-lang#65134 caused problems for Servo, want to make sure that this PR doesn't)
Configuration menu - View commit details
-
Copy full SHA for 24c460f - Browse repository at this point
Copy the full SHA 24c460fView commit details -
Rollup merge of rust-lang#72780 - GuillaumeGomez:enforce-doc-alias-ch…
…eck, r=ollie27 Enforce doc alias check Part of rust-lang#50146. r? @ollie27
Configuration menu - View commit details
-
Copy full SHA for ff618e5 - Browse repository at this point
Copy the full SHA ff618e5View commit details -
Rollup merge of rust-lang#73244 - ecstatic-morse:validate-generator-m…
…ir, r=tmandry Check for assignments between non-conflicting generator saved locals This is to prevent future changes to the generator transform from reintroducing the problem that caused rust-lang#73137. Namely, a store between two generator saved locals whose storage does not conflict. My ultimate goal is to introduce a modified version of rust-lang#71956 that handles this case properly. r? @tmandry
Configuration menu - View commit details
-
Copy full SHA for 9d4b416 - Browse repository at this point
Copy the full SHA 9d4b416View commit details -
Rollup merge of rust-lang#73523 - jyn514:everybody_loops, r=ecstatic-…
…morse Fix -Z unpretty=everybody_loops It turns out that this has not been working for who knows how long. Previously: ``` pub fn h() { 1 + 2; } ``` After this change: ``` pub fn h() { loop { } } ``` This only affected the pass when run with the command line pretty-printing option, so rustdoc was still replacing bodies with `loop {}`.
Configuration menu - View commit details
-
Copy full SHA for fd0bd25 - Browse repository at this point
Copy the full SHA fd0bd25View commit details -
Rollup merge of rust-lang#73639 - ayazhafiz:i/73553, r=davidtwco
Change heuristic for determining range literal Currently, rustc uses a heuristic to determine if a range expression is not a literal based on whether the expression looks like a function call or struct initialization. This fails for range literals whose lower/upper bounds are the results of function calls. A possibly-better heuristic is to check if the expression contains `..`, required in range literals. Of course, this is also not perfect; for example, if the range expression is a struct which includes some text with `..` this will fail, but in general I believe it is a better heuristic. A better alternative altogether is to add the `QPath::LangItem` enum variant suggested in rust-lang#60607. I would be happy to do this as a precursor to this patch if someone is able to provide general suggestions on how usages of `QPath` need to be changed later in the compiler with the `LangItem` variant. Closes rust-lang#73553
Configuration menu - View commit details
-
Copy full SHA for 6c929e4 - Browse repository at this point
Copy the full SHA 6c929e4View commit details -
Rollup merge of rust-lang#73646 - JohnTitor:add-tests, r=Dylan-DPC
Add some regression tests Closes rust-lang#44861 Closes rust-lang#51506 Closes rust-lang#59435 Closes rust-lang#69840
Configuration menu - View commit details
-
Copy full SHA for ec8af88 - Browse repository at this point
Copy the full SHA ec8af88View commit details