-
Notifications
You must be signed in to change notification settings - Fork 1
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
update from origin 2020-06-23 #6
Commits on Jun 19, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 0094f44 - Browse repository at this point
Copy the full SHA 0094f44View commit details -
Remove the const_raw_ptr_comparison feature gate.
We can never supply a meaningful implementation of this. Instead, the follow up commits will create two intrinsics that approximate comparisons: * `ptr_maybe_eq` * `ptr_maybe_ne` The fact that `ptr_maybe_eq(a, b)` is not necessarily the same value as `!ptr_maybe_ne(a, b)` is a symptom of this entire problem.
Configuration menu - View commit details
-
Copy full SHA for 9245ba8 - Browse repository at this point
Copy the full SHA 9245ba8View commit details -
Configuration menu - View commit details
-
Copy full SHA for e09b620 - Browse repository at this point
Copy the full SHA e09b620View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84f1d73 - Browse repository at this point
Copy the full SHA 84f1d73View commit details -
Rollup merge of #71568 - hbina:document_unsafety_slice_sort, r=joshtr…
…iplett Document unsafety in slice/sort.rs Let me know if these documentations are accurate c: I don't think I am capable enough to document the safety of `partition_blocks`, however. Related issue #66219
Configuration menu - View commit details
-
Copy full SHA for 85e1c3b - Browse repository at this point
Copy the full SHA 85e1c3bView commit details -
Rollup merge of #72709 - LeSeulArtichaut:unsafe-liballoc, r=nikomatsakis
`#[deny(unsafe_op_in_unsafe_fn)]` in liballoc This PR proposes to make use of the new `unsafe_op_in_unsafe_fn` lint, i.e. no longer consider the body of an unsafe function as an unsafe block and require explicit unsafe block to perform unsafe operations. This has been first (partly) suggested by @Mark-Simulacrum in #69245 (comment) Tracking issue for the feature: #71668. ~~Blocked on #71862.~~ r? @Mark-Simulacrum cc @nikomatsakis can you confirm that those changes are desirable? Should I restrict it to only BTree for the moment?
Configuration menu - View commit details
-
Copy full SHA for 55479de - Browse repository at this point
Copy the full SHA 55479deView commit details -
Rollup merge of #73214 - androm3da:hex_inline_asm_00, r=Amanieu
Add asm!() support for hexagon
Configuration menu - View commit details
-
Copy full SHA for bc773fe - Browse repository at this point
Copy the full SHA bc773feView commit details -
Rollup merge of #73248 - marmeladema:save-analysis-various-fixes, r=X…
…anewok save_analysis: improve handling of enum struct variant Fixes #61385
Configuration menu - View commit details
-
Copy full SHA for 186640a - Browse repository at this point
Copy the full SHA 186640aView commit details -
Rollup merge of #73257 - davidtwco:issue-73249-improper-ctypes-projec…
…tion, r=lcnr,varkor ty: projections in `transparent_newtype_field` Fixes #73249. This PR modifies `transparent_newtype_field` so that it handles projections with generic parameters, where `normalize_erasing_regions` would ICE.
Configuration menu - View commit details
-
Copy full SHA for 17064da - Browse repository at this point
Copy the full SHA 17064daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4910206 - Browse repository at this point
Copy the full SHA 4910206View commit details -
Rollup merge of #73300 - crlf0710:crate_level_only_check, r=petrochenkov
Implement crate-level-only lints checking. This implements a crate_level_only flag on lints, and when it is true, it becomes an error when user tries to specify this flag upon nodes other than crate node. This also turns on this flag for all non_ascii_ident lints.
Configuration menu - View commit details
-
Copy full SHA for 058971c - Browse repository at this point
Copy the full SHA 058971cView commit details -
Rollup merge of #73334 - ayazhafiz:err/num-type-cannot-fit, r=estebank
Note numeric literals that can never fit in an expected type re #72380 (comment) Given the toy code ```rust fn is_positive(n: usize) { n > -1_isize; } ``` We currently get a type mismatch error like the following: ``` error[E0308]: mismatched types --> src/main.rs:2:9 | 2 | n > -1_isize; | ^^^^^^^^ expected `usize`, found `isize` | help: you can convert an `isize` to `usize` and panic if the converted value wouldn't fit | 2 | n > (-1_isize).try_into().unwrap(); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` But clearly, `-1` can never fit into a `usize`, so the suggestion will always panic. A more useful message would tell the user that the value can never fit in the expected type: ``` error[E0308]: mismatched types --> test.rs:2:9 | 2 | n > -1_isize; | ^^^^^^^^ expected `usize`, found `isize` | note: `-1_isize` can never fit into `usize` --> test.rs:2:9 | 2 | n > -1_isize; | ^^^^^^^^ ``` Which is what this commit implements. I only added this check for negative literals because - Currently we can only perform such a check for literals (constant value propagation is outside the scope of the typechecker at this point) - A lint error for out-of-range numeric literals is already emitted IMO it makes more sense to put this check in librustc_lint, but as far as I can tell the typecheck pass happens before the lint pass, so I've added it here. r? @estebank
Configuration menu - View commit details
-
Copy full SHA for b285d68 - Browse repository at this point
Copy the full SHA b285d68View commit details -
Rollup merge of #73357 - petrochenkov:tmap, r=davidtwco
Use `LocalDefId` for import IDs in trait map cc #73291 (comment)
Configuration menu - View commit details
-
Copy full SHA for 65c33ed - Browse repository at this point
Copy the full SHA 65c33edView commit details -
Rollup merge of #73364 - joshtriplett:inline-asm, r=Amanieu
asm: Allow multiple template string arguments; interpret them as newline-separated Allow the `asm!` macro to accept a series of template arguments, and interpret them as if they were concatenated with a '\n' between them. This allows writing an `asm!` where each line of assembly appears in a separate template string argument. This syntax makes it possible for rustfmt to reliably format and indent each line of assembly, without risking changes to the inside of a template string. It also avoids the complexity of having the user carefully format and indent a multi-line string (including where to put the surrounding quotes), and avoids the extra indentation and lines of a call to `concat!`. For example, rewriting the second example from the [blog post on the new inline assembly syntax](https://blog.rust-lang.org/inside-rust/2020/06/08/new-inline-asm.html) using multiple template strings: ```rust fn main() { let mut bits = [0u8; 64]; for value in 0..=1024u64 { let popcnt; unsafe { asm!( " popcnt {popcnt}, {v}", "2:", " blsi rax, {v}", " jz 1f", " xor {v}, rax", " tzcnt rax, rax", " stosb", " jmp 2b", "1:", v = inout(reg) value => _, popcnt = out(reg) popcnt, out("rax") _, // scratch inout("rdi") bits.as_mut_ptr() => _, ); } println!("bits of {}: {:?}", value, &bits[0..popcnt]); } } ``` Note that all the template strings must appear before all other arguments; you cannot, for instance, provide a series of template strings intermixed with the corresponding operands.
Configuration menu - View commit details
-
Copy full SHA for 687f929 - Browse repository at this point
Copy the full SHA 687f929View commit details -
Rollup merge of #73382 - Aaron1011:fix/self-receiver-candidates, r=pe…
…trochenkov Only display other method receiver candidates if they actually apply Previously, we would suggest `Box<Self>` as a valid receiver, even if method resolution only succeeded due to an autoderef (e.g. to `&self`)
Configuration menu - View commit details
-
Copy full SHA for b443a10 - Browse repository at this point
Copy the full SHA b443a10View commit details -
Rollup merge of #73465 - lzutao:spec-char-tostring, r=sfackler
Add specialization of `ToString for char` Closes #73462
Configuration menu - View commit details
-
Copy full SHA for d2272d4 - Browse repository at this point
Copy the full SHA d2272d4View commit details -
Rollup merge of #73489 - sexxi-goose:init_place_refactor, r=nikomatsakis
Refactor hir::Place For the following code ```rust let c = || bar(foo.x, foo.x) ``` We generate two different `hir::Place`s for both `foo.x`. Handling this adds overhead for analysis we need to do for RFC 2229. We also want to store type information at each Projection to support analysis as part of the RFC. This resembles what we have for `mir::Place` This commit modifies the Place as follows: - Rename to `PlaceWithHirId`, where there `hir_id` is that of the expressioin. - Move any other information that describes the access out to another struct now called `Place`. - Removed `Span`, it can be accessed using the [hir API](https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/hir/map/struct.Map.html#method.span) - Modify `Projection` to be a strucutre of its own, that currently only contains the `ProjectionKind`. Adding type information to projections wil be completed as part of rust-lang/project-rfc-2229#5 Closes rust-lang/project-rfc-2229#3
Configuration menu - View commit details
-
Copy full SHA for a88182f - Browse repository at this point
Copy the full SHA a88182fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 33b304c - Browse repository at this point
Copy the full SHA 33b304cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f9d338 - Browse repository at this point
Copy the full SHA 2f9d338View commit details -
Configuration menu - View commit details
-
Copy full SHA for 014e605 - Browse repository at this point
Copy the full SHA 014e605View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f48465 - Browse repository at this point
Copy the full SHA 1f48465View commit details -
code coverage foundation for hash and num_counters
Replaced dummy values for hash and num_counters with computed values, and refactored InstrumentCoverage pass to simplify injecting more counters per function in upcoming versions. Improved usage documentation and error messaging.
Configuration menu - View commit details
-
Copy full SHA for 8c7c84b - Browse repository at this point
Copy the full SHA 8c7c84bView commit details -
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 #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 -
Configuration menu - View commit details
-
Copy full SHA for 006b482 - Browse repository at this point
Copy the full SHA 006b482View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16dd584 - Browse repository at this point
Copy the full SHA 16dd584View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6aa2e9d - Browse repository at this point
Copy the full SHA 6aa2e9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c09ad0 - Browse repository at this point
Copy the full SHA 7c09ad0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a42e5a1 - Browse repository at this point
Copy the full SHA a42e5a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for d0ad15d - Browse repository at this point
Copy the full SHA d0ad15dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e997375 - Browse repository at this point
Copy the full SHA e997375View commit details -
Configuration menu - View commit details
-
Copy full SHA for 90e01ee - Browse repository at this point
Copy the full SHA 90e01eeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 64c486b - Browse repository at this point
Copy the full SHA 64c486bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a979d8 - Browse repository at this point
Copy the full SHA 6a979d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for a1c769b - Browse repository at this point
Copy the full SHA a1c769bView commit details -
Configuration menu - View commit details
-
Copy full SHA for b5d5994 - Browse repository at this point
Copy the full SHA b5d5994View commit details -
Configuration menu - View commit details
-
Copy full SHA for 16ad3f3 - Browse repository at this point
Copy the full SHA 16ad3f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 890cef6 - Browse repository at this point
Copy the full SHA 890cef6View commit details -
Configuration menu - View commit details
-
Copy full SHA for d63195b - Browse repository at this point
Copy the full SHA d63195bView commit details -
Auto merge of #73257 - davidtwco:issue-73249-improper-ctypes-projecti…
…on, r=lcnr,varkor ty: projections in `transparent_newtype_field` Fixes #73249. This PR modifies `transparent_newtype_field` so that it handles projections with generic parameters, where `normalize_erasing_regions` would ICE.
Configuration menu - View commit details
-
Copy full SHA for 2d8bd9b - Browse repository at this point
Copy the full SHA 2d8bd9bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 96031e2 - Browse repository at this point
Copy the full SHA 96031e2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f0bd5f - Browse repository at this point
Copy the full SHA 8f0bd5fView commit details -
Configuration menu - View commit details
-
Copy full SHA for e75fbae - Browse repository at this point
Copy the full SHA e75fbaeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 562f496 - Browse repository at this point
Copy the full SHA 562f496View commit details -
The `E` type parameter was unnecessary, so it's now removed. The folding closure now has reduced parametricity on just `T = Self::Item`, rather than the whole `Self` iterator type. There's otherwise no functional change in this.
Configuration menu - View commit details
-
Copy full SHA for db0d70e - Browse repository at this point
Copy the full SHA db0d70eView commit details -
Auto merge of #73511 - Manishearth:rollup-3iffxd8, r=Manishearth
Rollup of 13 pull requests Successful merges: - #71568 (Document unsafety in slice/sort.rs) - #72709 (`#[deny(unsafe_op_in_unsafe_fn)]` in liballoc) - #73214 (Add asm!() support for hexagon) - #73248 (save_analysis: improve handling of enum struct variant) - #73257 (ty: projections in `transparent_newtype_field`) - #73261 (Suggest `?Sized` when applicable for ADTs) - #73300 (Implement crate-level-only lints checking.) - #73334 (Note numeric literals that can never fit in an expected type) - #73357 (Use `LocalDefId` for import IDs in trait map) - #73364 (asm: Allow multiple template string arguments; interpret them as newline-separated) - #73382 (Only display other method receiver candidates if they actually apply) - #73465 (Add specialization of `ToString for char`) - #73489 (Refactor hir::Place) Failed merges: r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 34c5cd9 - Browse repository at this point
Copy the full SHA 34c5cd9View 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 -
Rollup merge of #71420 - RalfJung:specialization-incomplete, r=matthe…
…wjasper Specialization is unsound As discussed in #31844 (comment), it might be a good idea to warn users of specialization that the feature they are using is unsound. I also expanded the "incomplete feature" warning to link the user to the tracking issue.
Configuration menu - View commit details
-
Copy full SHA for 203305d - Browse repository at this point
Copy the full SHA 203305dView commit details -
Rollup merge of #71899 - cuviper:try_find_map, r=dtolnay
Refactor `try_find` a little ~~This works like `find_map`, but mapping to a `Try` type. It stops when `Ok` is `Some(value)`, with an additional short-circuit on `Try::Error`. This is similar to the unstable `try_find`, but has the advantage of being able to directly return the user's `R: Try` type directly, rather than converting to `Result`.~~ (removed -- `try_find_map` was declined in review) This PR also refactors `try_find` a little to match style. The `E` type parameter was unnecessary, so it's now removed. The folding closure now has reduced parametricity on just `T = Self::Item`, rather than the whole `Self` iterator type. There's otherwise no functional change in this.
Configuration menu - View commit details
-
Copy full SHA for 5c9cd82 - Browse repository at this point
Copy the full SHA 5c9cd82View commit details -
Rollup merge of #72689 - lcnr:common_str, r=estebank
add str to common types I already expected this to be the case and it may slightly improve perf. Afaict if we ever want to change str into a lang item this would have to get reverted. As that would be fairly simple I don't believe this to cause any problems in the future.
Configuration menu - View commit details
-
Copy full SHA for 218b90f - Browse repository at this point
Copy the full SHA 218b90fView commit details -
Rollup merge of #72791 - lcnr:coerce-refactor, r=estebank
update coerce docs and unify relevant tests Merges `test/ui/coerce` with `test/ui/coercion`. Updates the documentation of `librustc_typeck/check/coercion.rs`. Adds 2 new coercion tests.
Configuration menu - View commit details
-
Copy full SHA for c0a25be - Browse repository at this point
Copy the full SHA c0a25beView commit details -
Rollup merge of #72934 - christianpoveda:mut-borrows-in-consts, r=oli…
…-obk forbid mutable references in all constant contexts except for const-fns PR to address #71212 cc: @ecstatic-morse
Configuration menu - View commit details
-
Copy full SHA for dac512e - Browse repository at this point
Copy the full SHA dac512eView commit details -
Rollup merge of #73027 - doctorn:issue-72690, r=estebank
Make `need_type_info_err` more conservative Makes sure arg patterns we are going to suggest on are actually contained within the span of the obligation that caused the inference error (credit to @lcnr for suggesting this fix). There's a subtle trade-off regarding the handling of local patterns which I've left a comment about. Resolves #72690
Configuration menu - View commit details
-
Copy full SHA for 2d1bd57 - Browse repository at this point
Copy the full SHA 2d1bd57View commit details -
Rollup merge of #73347 - tmiasko:incompatible-sanitizers, r=nikic
Diagnose use of incompatible sanitizers Emit an error when incompatible sanitizer are configured through command line options. Previously the last one configured prevailed and others were silently ignored. Additionally use a set to represent configured sanitizers, making it possible to enable multiple sanitizers at once. At least in principle, since currently all of them are considered to be incompatible with others.
Configuration menu - View commit details
-
Copy full SHA for 17b80d9 - Browse repository at this point
Copy the full SHA 17b80d9View commit details -
Rollup merge of #73359 - jonas-schievink:do-the-shimmy, r=matthewjasper
shim.rs: avoid creating `Call` terminators calling `Self` Also contains some cleanup and doc comment additions so I could make sense of the code. Fixes #73109 Closes #73175 r? @matthewjasper
Configuration menu - View commit details
-
Copy full SHA for fe4b485 - Browse repository at this point
Copy the full SHA fe4b485View commit details -
Rollup merge of #73399 - GuillaumeGomez:cleanup-e0668, r=Dylan-DPC
Clean up E0668 explanation r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for 2dbb8b6 - Browse repository at this point
Copy the full SHA 2dbb8b6View commit details -
Rollup merge of #73436 - GuillaumeGomez:cleanup-e0670, r=Dylan-DPC
Clean up E0670 explanation r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for 2377a50 - Browse repository at this point
Copy the full SHA 2377a50View commit details -
Rollup merge of #73440 - jyn514:bootstrap/build-rustdoc, r=Mark-Simul…
…acrum Add src/librustdoc as an alias for src/tools/rustdoc No one actually works with src/tools/rustdoc, it's almost empty. Closes #73439
Configuration menu - View commit details
-
Copy full SHA for d69d4c3 - Browse repository at this point
Copy the full SHA d69d4c3View commit details -
Rollup merge of #73442 - davidtwco:issue-72181-pretty-print-const-val…
…-enum-no-variants, r=oli-obk pretty/mir: const value enums with no variants Fixes #72181. This PR modifies the pretty printer and const eval in the MIR so that `destructure_const` (used in `pretty_print_const_value`) can handle enums with no variants (or types containing enums with no variants). I'm not convinced that this is the correct approach, folks more familiar with `destructure_const` would be able to say - happy to adjust the PR. Looking through `destructure_const` and the functions that it invokes, it didn't seem like it was written to handle zero-variant-enums - I assume that case is handled earlier in some way so `destructure_const` doesn't need to under normal circumstances. It didn't seem like it would be straightforward to make `destructure_const` handle this case in a first-class-feeling way (e.g. adding a `Variants::None` variant), so this PR makes some minimal changes to avoid ICEs.
Configuration menu - View commit details
-
Copy full SHA for db7203d - Browse repository at this point
Copy the full SHA db7203dView commit details -
Rollup merge of #73452 - matthewjasper:auto-rec, r=nikomatsakis
Unify region variables when projecting associated types This is required to avoid cycles when evaluating auto trait predicates. Notably, this is required to be able add Chalk types to `CtxtInterners` for `cfg(parallel_compiler)`. r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 61f8c3e - Browse repository at this point
Copy the full SHA 61f8c3eView commit details -
Rollup merge of #73458 - tmiasko:arena-layout, r=matthewjasper
Use alloc::Layout in DroplessArena API
Configuration menu - View commit details
-
Copy full SHA for fd1c783 - Browse repository at this point
Copy the full SHA fd1c783View commit details -
Rollup merge of #73484 - poliorcetics:use-prelude-doc, r=sfackler
Update the doc for std::prelude to the correct behavior Fixes #64686. One line change to ensure the docs are correct about the behavior of the compiler when inserting`std::prelude::v1`. I don't think examples are necessary but I can add some (especially those from the original issue) if needed.
Configuration menu - View commit details
-
Copy full SHA for 7777b0b - Browse repository at this point
Copy the full SHA 7777b0bView commit details -
Rollup merge of #73506 - Xanewok:update-rls, r=Xanewok
Bump Rustfmt and RLS Fixes #73406 Fixes #73199 Fixes #73407 Fixes #73200 cc @calebcartwright @topecongiro r? @ghost Let's see what CI says first
Configuration menu - View commit details
-
Copy full SHA for 3e40cca - Browse repository at this point
Copy the full SHA 3e40ccaView commit details -
Auto merge of #73528 - Manishearth:rollup-7djz8nd, r=Manishearth
Rollup of 16 pull requests Successful merges: - #71420 (Specialization is unsound) - #71899 (Refactor `try_find` a little) - #72689 (add str to common types) - #72791 (update coerce docs and unify relevant tests) - #72934 (forbid mutable references in all constant contexts except for const-fns) - #73027 (Make `need_type_info_err` more conservative) - #73347 (Diagnose use of incompatible sanitizers) - #73359 (shim.rs: avoid creating `Call` terminators calling `Self`) - #73399 (Clean up E0668 explanation) - #73436 (Clean up E0670 explanation) - #73440 (Add src/librustdoc as an alias for src/tools/rustdoc) - #73442 (pretty/mir: const value enums with no variants) - #73452 (Unify region variables when projecting associated types) - #73458 (Use alloc::Layout in DroplessArena API) - #73484 (Update the doc for std::prelude to the correct behavior) - #73506 (Bump Rustfmt and RLS) Failed merges: r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 033013c - Browse repository at this point
Copy the full SHA 033013cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a540b1b - Browse repository at this point
Copy the full SHA a540b1bView commit details -
This lint checks that all declarations for extern fns of the same name are declared with the same types.
Configuration menu - View commit details
-
Copy full SHA for 6b74e3c - Browse repository at this point
Copy the full SHA 6b74e3cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f07952 - Browse repository at this point
Copy the full SHA 8f07952View commit details -
Configuration menu - View commit details
-
Copy full SHA for 556b7ba - Browse repository at this point
Copy the full SHA 556b7baView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0624a5a - Browse repository at this point
Copy the full SHA 0624a5aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2851c9f - Browse repository at this point
Copy the full SHA 2851c9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a3e88be - Browse repository at this point
Copy the full SHA a3e88beView commit details -
Configuration menu - View commit details
-
Copy full SHA for d2e6e93 - Browse repository at this point
Copy the full SHA d2e6e93View commit details -
Configuration menu - View commit details
-
Copy full SHA for 66e7a14 - Browse repository at this point
Copy the full SHA 66e7a14View commit details -
Configuration menu - View commit details
-
Copy full SHA for c4840db - Browse repository at this point
Copy the full SHA c4840dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for a24c897 - Browse repository at this point
Copy the full SHA a24c897View commit details -
Configuration menu - View commit details
-
Copy full SHA for 180334c - Browse repository at this point
Copy the full SHA 180334cView commit details -
Configuration menu - View commit details
-
Copy full SHA for ef10694 - Browse repository at this point
Copy the full SHA ef10694View commit details -
Configuration menu - View commit details
-
Copy full SHA for 936b6bf - Browse repository at this point
Copy the full SHA 936b6bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for a98f35f - Browse repository at this point
Copy the full SHA a98f35fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a0f1af - Browse repository at this point
Copy the full SHA 6a0f1afView commit details -
Configuration menu - View commit details
-
Copy full SHA for 94817e3 - Browse repository at this point
Copy the full SHA 94817e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1e6e082 - Browse repository at this point
Copy the full SHA 1e6e082View commit details -
Decouple
Autoderef
withFnCtxt
and moveAutoderef
to `librustc_……trait_selection`.
Configuration menu - View commit details
-
Copy full SHA for 5155518 - Browse repository at this point
Copy the full SHA 5155518View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef68bf3 - Browse repository at this point
Copy the full SHA ef68bf3View commit details -
lint: normalize projections using opaque types
This commit normalizes projections which contain opaque types (opaque types are otherwise linted against, which is would have previously made the test cases added in this commit fail). Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for 2e781dd - Browse repository at this point
Copy the full SHA 2e781ddView commit details -
Configuration menu - View commit details
-
Copy full SHA for 29272fc - Browse repository at this point
Copy the full SHA 29272fcView commit details -
Consider fewer predicates for projection candidates
We now require that projection candidates are applicable with the idenitity substs of the trait, rather than allowing predicates that are only applicable for certain substs.
Configuration menu - View commit details
-
Copy full SHA for 04e589c - Browse repository at this point
Copy the full SHA 04e589cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 59d8c45 - Browse repository at this point
Copy the full SHA 59d8c45View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5eaee0d - Browse repository at this point
Copy the full SHA 5eaee0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for f1e0710 - Browse repository at this point
Copy the full SHA f1e0710View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13104ef - Browse repository at this point
Copy the full SHA 13104efView commit details -
Refer just to the issue in the raw ptr cmp diagnostic instead of expl…
…aining everything in the diagnostic
Configuration menu - View commit details
-
Copy full SHA for 9e88b48 - Browse repository at this point
Copy the full SHA 9e88b48View commit details -
Configuration menu - View commit details
-
Copy full SHA for 53686b9 - Browse repository at this point
Copy the full SHA 53686b9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 98e97a4 - Browse repository at this point
Copy the full SHA 98e97a4View commit details -
Check associated type satisfy their bounds
This was currently only happening due to eager normalization, which isn't possible if there's specialization or bound variables.
Configuration menu - View commit details
-
Copy full SHA for d660dbc - Browse repository at this point
Copy the full SHA d660dbcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9818bc0 - Browse repository at this point
Copy the full SHA 9818bc0View commit details -
Move bounds on associated types to the type
Given `trait X { type U; }` the bound `<Self as X>::U` now lives on the type, rather than the trait. This is feature gated on `feature(generic_associated_types)` for now until more testing can be done. The also enabled type-generic associated types since we no longer need "implies bounds".
Configuration menu - View commit details
-
Copy full SHA for db4826d - Browse repository at this point
Copy the full SHA db4826dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5e8c9f4 - Browse repository at this point
Copy the full SHA 5e8c9f4View commit details -
Rollup merge of #72600 - Aaron1011:fix/anon-const-encoding, r=varkor
Properly encode AnonConst into crate metadata Fixes #68104 Previous, we were encoding AnonConst as a regular Const, causing us to treat them differently after being deserialized in another compilation session.
Configuration menu - View commit details
-
Copy full SHA for 5431ef6 - Browse repository at this point
Copy the full SHA 5431ef6View commit details -
Rollup merge of #73055 - lcnr:skol-no-more, r=matthewjasper
remove leftover mentions of `skol` and `int` from the compiler This PR mostly changes `skol` -> `placeholder` and all cases where `int` is used as a type to `i32`.
Configuration menu - View commit details
-
Copy full SHA for b015b28 - Browse repository at this point
Copy the full SHA b015b28View commit details -
Rollup merge of #73058 - tmiasko:aarch64-san, r=nagisa
Support sanitizers on aarch64-unknown-linux-gnu
Configuration menu - View commit details
-
Copy full SHA for 913aac8 - Browse repository at this point
Copy the full SHA 913aac8View commit details -
Rollup merge of #73171 - tblah:riscv-qemu-test, r=pietroalbini
RISC-V Emulated Testing Adds a disabled docker image on which to run RISC-V tests. Based on the armhf image. Test using ``` ./src/ci/docker/run.sh riscv64gc-linux ``` cc: @msizanoen1
Configuration menu - View commit details
-
Copy full SHA for 77efcab - Browse repository at this point
Copy the full SHA 77efcabView commit details -
Rollup merge of #73404 - ajpaverd:cfguard_syntax, r=Mark-Simulacrum
Update CFGuard syntax Update the naming and syntax of the control-flow-guard option, as discussed in #68793. r? @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 91bd333 - Browse repository at this point
Copy the full SHA 91bd333View commit details -
Rollup merge of #73444 - pietroalbini:ci-remove-try-alt, r=Mark-Simul…
…acrum ci: disable alt build during try builds The alt build is not actually needed often, and it can be added back on a case-by-case basis if a specific PR needs access to it. This will free up a builder. r? @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 7930ee6 - Browse repository at this point
Copy the full SHA 7930ee6View commit details -
Rollup merge of #73471 - raoulstrackx:raoul/fpu_tag_word, r=jethrogb
Prevent attacker from manipulating FPU tag word used in SGX enclave Insufficient sanitization of the x87 FPU tag word in the trusted enclave runtime allowed unprivileged adversaries in the containing host application to induce incoherent or unexpected results for ABI-compliant compiled enclave application code that uses the x87 FPU. Vulnerability was disclosed to us by Fritz Alder, Jo Van Bulck, David Oswald and Frank Piessens cc: @jethrogb
Configuration menu - View commit details
-
Copy full SHA for 96b86ea - Browse repository at this point
Copy the full SHA 96b86eaView commit details -
Rollup merge of #73539 - LukasKalbertodt:deprecate-vec-remove-item, r…
Configuration menu - View commit details
-
Copy full SHA for c1cad70 - Browse repository at this point
Copy the full SHA c1cad70View commit details -
Rollup merge of #73543 - GuillaumeGomez:cleanup-e0695, r=Dylan-DPC
Clean up E0695 explanation r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for bb0016b - Browse repository at this point
Copy the full SHA bb0016bView commit details -
core/time: Add Duration methods for zero
This patch adds two methods to `Duration`. The first, `Duration::zero`, provides a `const` constructor for getting an zero-length duration. This is also what `Default` provides (this was clarified in the docs), though `default` is not `const`. The second, `Duration::is_zero`, returns true if a `Duration` spans no time (i.e., because its components are all zero). Previously, the way to do this was either to compare both `as_secs` and `subsec_nanos` to 0, to compare against `Duration::new(0, 0)`, or to use the `u128` method `as_nanos`, none of which were particularly elegant.
Configuration menu - View commit details
-
Copy full SHA for 3ff5879 - Browse repository at this point
Copy the full SHA 3ff5879View commit details -
Configuration menu - View commit details
-
Copy full SHA for ad7fd62 - Browse repository at this point
Copy the full SHA ad7fd62View commit details -
Configuration menu - View commit details
-
Copy full SHA for 386114b - Browse repository at this point
Copy the full SHA 386114bView commit details -
Configuration menu - View commit details
-
Copy full SHA for c883fa4 - Browse repository at this point
Copy the full SHA c883fa4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e614116 - Browse repository at this point
Copy the full SHA e614116View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d2acdf - Browse repository at this point
Copy the full SHA 1d2acdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 27cc7c7 - Browse repository at this point
Copy the full SHA 27cc7c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 820bba1 - Browse repository at this point
Copy the full SHA 820bba1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2be403c - Browse repository at this point
Copy the full SHA 2be403cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7aaadb6 - Browse repository at this point
Copy the full SHA 7aaadb6View commit details -
Make warning an error; use help instead of suggestion; clean up code
For some reason, the help message is now in a separate message, which adds a lot of noise. I would like to try to get it back to one message.
Configuration menu - View commit details
-
Copy full SHA for b94b7e7 - Browse repository at this point
Copy the full SHA b94b7e7View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac54265 - Browse repository at this point
Copy the full SHA ac54265View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7c5b66f - Browse repository at this point
Copy the full SHA 7c5b66fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c7da50d - Browse repository at this point
Copy the full SHA c7da50dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e8be797 - Browse repository at this point
Copy the full SHA e8be797View commit details -
Configuration menu - View commit details
-
Copy full SHA for b00b1a4 - Browse repository at this point
Copy the full SHA b00b1a4View commit details -
Configuration menu - View commit details
-
Copy full SHA for f4dfc61 - Browse repository at this point
Copy the full SHA f4dfc61View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4ba6697 - Browse repository at this point
Copy the full SHA 4ba6697View commit details -
Create a separate, tool-only suggestion for the comma
That way the comma isn't highlighted as part of the option in the UI. Weirdly, the comma removal suggestion shows up in the UI.
Configuration menu - View commit details
-
Copy full SHA for 8fe6710 - Browse repository at this point
Copy the full SHA 8fe6710View commit details -
Configuration menu - View commit details
-
Copy full SHA for db9d376 - Browse repository at this point
Copy the full SHA db9d376View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58f812b - Browse repository at this point
Copy the full SHA 58f812bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8d80cc5 - Browse repository at this point
Copy the full SHA 8d80cc5View commit details -
Configuration menu - View commit details
-
Copy full SHA for c31785a - Browse repository at this point
Copy the full SHA c31785aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5a8e915 - Browse repository at this point
Copy the full SHA 5a8e915View commit details -
Auto merge of #73550 - RalfJung:rollup-5huj1k1, r=RalfJung
Rollup of 9 pull requests Successful merges: - #72600 (Properly encode AnonConst into crate metadata) - #73055 (remove leftover mentions of `skol` and `int` from the compiler) - #73058 (Support sanitizers on aarch64-unknown-linux-gnu) - #73171 (RISC-V Emulated Testing) - #73404 (Update CFGuard syntax) - #73444 (ci: disable alt build during try builds) - #73471 (Prevent attacker from manipulating FPU tag word used in SGX enclave) - #73539 (Deprecate `Vec::remove_item`) - #73543 (Clean up E0695 explanation) Failed merges: r? @ghost
Configuration menu - View commit details
-
Copy full SHA for f455e46 - Browse repository at this point
Copy the full SHA f455e46View commit details -
Configuration menu - View commit details
-
Copy full SHA for bfb0e8d - Browse repository at this point
Copy the full SHA bfb0e8dView commit details -
Christian Poveda committed
Jun 20, 2020 Configuration menu - View commit details
-
Copy full SHA for 9355168 - Browse repository at this point
Copy the full SHA 9355168View commit details -
Rollup merge of #72456 - ldm0:dereftrait, r=estebank
Try to suggest dereferences on trait selection failed Fixes #39029 Fixes #62530 This PR consists of two parts: 1. Decouple `Autoderef` with `FnCtxt` and move `Autoderef` to `librustc_trait_selection`. 2. Try to suggest dereferences when trait selection failed. The first is needed because: 1. For suggesting dereferences, the struct `Autoderef` should be used. But before this PR, it is placed in `librustc_typeck`, which depends on `librustc_trait_selection`. But trait selection error emitting happens in `librustc_trait_selection`, if we want to use `Autoderef` in it, dependency loop is inevitable. So I moved the `Autoderef` to `librustc_trait_selection`. 2. Before this PR, `FnCtxt` is coupled to `Autoderef`, and `FnCtxt` only exists in `librustc_typeck`. So decoupling is needed. After this PR, we can get suggestion like this: ``` error[E0277]: the trait bound `&Baz: Happy` is not satisfied --> $DIR/trait-suggest-deferences-multiple.rs:34:9 | LL | fn foo<T>(_: T) where T: Happy {} | ----- required by this bound in `foo` ... LL | foo(&baz); | ^^^^ | | | the trait `Happy` is not implemented for `&Baz` | help: consider adding dereference here: `&***baz` error: aborting due to previous error For more information about this error, try `rustc --explain E0277`. ``` r? @estebank
Configuration menu - View commit details
-
Copy full SHA for a1404a9 - Browse repository at this point
Copy the full SHA a1404a9View commit details -
Rollup merge of #72788 - matthewjasper:projection-bound-validation, r…
…=nikomatsakis Projection bound validation During selection we use bounds declared on associated types (e.g. `type X: Copy`) to satisfy trait/projection bounds. This would be fine so long as those bounds are checked on any impls/trait objects. For simple cases they are because the bound `Self::X: Copy` gets normalized when we check the impl. However, for default values with specialization and higher-ranked bounds from GATs or otherwise, we can't normalize when checking the impl, and so we use the bound from the trait to prove that the bound applies to the impl, which is clearly unsound. This PR makes 2 fixes for this: 1. Requiring that the bounds on the trait apply to a projection type with the corresponding substs, so a bound `for<'a> <Self as X<'a>>::U: Copy` on the trait cannot be used to prove `<T as X<'_>>::U: Copy`. 2. Actually checking that the bounds that we still allow apply to generic/default associated types. Opening for a crater run. Closes #68641 Closes #68642 Closes #68643 Closes #68644 Closes #68645 Closes #68656 r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 1a171d0 - Browse repository at this point
Copy the full SHA 1a171d0View commit details -
Rollup merge of #72790 - jonhoo:duration-is-zero, r=LukasKalbertodt
core/time: Add Duration methods for zero This patch adds two methods to `Duration`. The first, `Duration::zero`, provides a `const` constructor for getting an zero-length duration. This is also what `Default` provides (this was clarified in the docs), though `default` is not `const`. The second, `Duration::is_zero`, returns true if a `Duration` spans no time (i.e., because its components are all zero). Previously, the way to do this was either to compare both `as_secs` and `subsec_nanos` to 0, to compare against `Duration::new(0, 0)`, or to use the `u128` method `as_nanos`, none of which were particularly elegant.
Configuration menu - View commit details
-
Copy full SHA for c47550f - Browse repository at this point
Copy the full SHA c47550fView commit details -
Rollup merge of #73227 - camelid:multiple-asm-options, r=Amanieu
Allow multiple `asm!` options groups and report an error on duplicate options Fixes #73193 Cc @joshtriplett @Amanieu - [x] Allow multiple options - [x] Update existing test - [x] Add new tests - [x] Check for duplicate options - [x] Add duplicate options tests - [x] Finalize suggestion format for duplicate options error
Configuration menu - View commit details
-
Copy full SHA for 45d6aef - Browse repository at this point
Copy the full SHA 45d6aefView commit details -
Rollup merge of #73287 - davidtwco:issue-73251-opaque-types-in-projec…
…tions, r=estebank lint: normalize projections using opaque types Fixes #73251. This PR normalizes projections which use opaque types (opaque types are otherwise linted against, which is would have previously made the test cases added in this PR fail).
Configuration menu - View commit details
-
Copy full SHA for 9003087 - Browse repository at this point
Copy the full SHA 9003087View commit details -
Rollup merge of #73291 - marmeladema:hir-id-ification-fix, r=petroche…
…nkov Pre-compute `LocalDefId` <-> `HirId` mappings and remove `NodeId` <-> `HirId` conversion APIs cc #50928 I don't know who is exactly the best person to review this. r? @petrochenkov
Configuration menu - View commit details
-
Copy full SHA for 0a8fd43 - Browse repository at this point
Copy the full SHA 0a8fd43View commit details -
Rollup merge of #73378 - matthewjasper:arena-not-special, r=oli-obk
Remove use of specialization from librustc_arena This reworks the macro so that specialization, `transmute` and `#[marker]` are not used. r? @oli-obk
Configuration menu - View commit details
-
Copy full SHA for a876a5a - Browse repository at this point
Copy the full SHA a876a5aView commit details -
Rollup merge of #73411 - ehuss:bump-stage0, r=Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 9a82736 - Browse repository at this point
Copy the full SHA 9a82736View commit details -
Rollup merge of #73443 - pietroalbini:gha-auto-fallible, r=Mark-Simul…
…acrum ci: allow gating GHA on everything but macOS In our GitHub Actions setup macOS is too unreliable to gate on it, but the other builders work fine. This commit splits the macOS builders into a separate job (called `auto-fallible`), allowing us to gate on the auto job without failing due to macOS spurious failures. cc rust-lang/rust-central-station#848 r? @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 929f032 - Browse repository at this point
Copy the full SHA 929f032View commit details -
Configuration menu - View commit details
-
Copy full SHA for fc60282 - Browse repository at this point
Copy the full SHA fc60282View commit details -
Auto merge of #73563 - Manishearth:rollup-oowgwwm, r=Manishearth
Rollup of 9 pull requests Successful merges: - #72456 (Try to suggest dereferences on trait selection failed) - #72788 (Projection bound validation) - #72790 (core/time: Add Duration methods for zero) - #73227 (Allow multiple `asm!` options groups and report an error on duplicate options) - #73287 (lint: normalize projections using opaque types) - #73291 (Pre-compute `LocalDefId` <-> `HirId` mappings and remove `NodeId` <-> `HirId` conversion APIs) - #73378 (Remove use of specialization from librustc_arena) - #73411 (Update bootstrap to rustc 1.45.0-beta.2 (1dc0f6d 2020-06-15)) - #73443 (ci: allow gating GHA on everything but macOS) Failed merges: r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 7058471 - Browse repository at this point
Copy the full SHA 7058471View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4896a06 - Browse repository at this point
Copy the full SHA 4896a06View commit details
Commits on Jun 21, 2020
-
Configuration menu - View commit details
-
Copy full SHA for a63eb3c - Browse repository at this point
Copy the full SHA a63eb3cView commit details -
Auto merge of #70946 - jumbatm:clashing-extern-decl, r=nagisa
Add a lint to catch clashing `extern` fn declarations. Closes #69390. Adds lint `clashing_extern_decl` to detect when, within a single crate, an extern function of the same name is declared with different types. Because two symbols of the same name cannot be resolved to two different functions at link time, and one function cannot possibly have two types, a clashing extern declaration is almost certainly a mistake. This lint does not run between crates because a project may have dependencies which both rely on the same extern function, but declare it in a different (but valid) way. For example, they may both declare an opaque type for one or more of the arguments (which would end up distinct types), or use types that are valid conversions in the language the extern fn is defined in. In these cases, we can't say that the clashing declaration is incorrect. r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for 228a0ed - Browse repository at this point
Copy the full SHA 228a0edView commit details -
This commit fixes typos in the doc comments of 'librustc_mir/monomorphize/collector.rs'
Configuration menu - View commit details
-
Copy full SHA for 6374054 - Browse repository at this point
Copy the full SHA 6374054View commit details -
Auto merge of #71911 - wesleywiser:const_prop_small_cleanups, r=oli-obk
[mir-opt] Small ConstProp cleanup
Configuration menu - View commit details
-
Copy full SHA for 38bd83d - Browse repository at this point
Copy the full SHA 38bd83dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e3d735d - Browse repository at this point
Copy the full SHA e3d735dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ea55f1 - Browse repository at this point
Copy the full SHA 8ea55f1View commit details -
Cache flags and escaping vars for predicates
Also hash predicates by address
Configuration menu - View commit details
-
Copy full SHA for f802ee1 - Browse repository at this point
Copy the full SHA f802ee1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e12272 - Browse repository at this point
Copy the full SHA 6e12272View commit details -
Auto merge of #73546 - RalfJung:miri, r=RalfJung
update Miri Fixes #73405 Cc @rust-lang/miri r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 7adbc0d - Browse repository at this point
Copy the full SHA 7adbc0dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1c74ab4 - Browse repository at this point
Copy the full SHA 1c74ab4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e465b22 - Browse repository at this point
Copy the full SHA e465b22View commit details -
Configuration menu - View commit details
-
Copy full SHA for 467415d - Browse repository at this point
Copy the full SHA 467415dView commit details -
Configuration menu - View commit details
-
Copy full SHA for a657be4 - Browse repository at this point
Copy the full SHA a657be4View commit details -
Auto merge of #72696 - jethrogb:jb/llvm-zlib, r=Mark-Simulacrum
Enable LLVM zlib Compilers may generate ELF objects with compressed sections (although rustc currently doesn't do this). Currently, when linking these with `rust-lld`, you'll get this error: `rust-lld: error: ...: contains a compressed section, but zlib is not available` This enables zlib when building LLVM.
Configuration menu - View commit details
-
Copy full SHA for 349f6bf - Browse repository at this point
Copy the full SHA 349f6bfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 726b6f4 - Browse repository at this point
Copy the full SHA 726b6f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for c14d85f - Browse repository at this point
Copy the full SHA c14d85fView commit details -
Update src/librustc_mir/monomorphize/collector.rs
typo fix Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 893077c - Browse repository at this point
Copy the full SHA 893077cView commit details -
Prefer accessible paths in 'use' suggestions
This fixes an issue with the following sample: mod foo { mod inaccessible { pub struct X; } pub mod avail { pub struct X; } } fn main() { X; } Instead of suggesting both `use crate::foo::inaccessible::X;` and `use crate::foo::avail::X;`, it should only suggest the latter. It is done by trimming the list of suggestions from inaccessible paths if accessible paths are present. Visibility is checked with `is_accessible_from` now instead of being hard-coded. - Some tests fixes are trivial, and others require a bit more explaining, here are my comments: src/test/ui/issues/issue-35675.stderr: Only needs to make the enum public to have the suggestion make sense. src/test/ui/issues/issue-42944.stderr: Importing the tuple struct won't help because its constructor is not visible, so the attempted constructor does not work. In that case, it's better not to suggest it. The case where the constructor is public is covered in `issue-26545.rs`.
Configuration menu - View commit details
-
Copy full SHA for fea5ab1 - Browse repository at this point
Copy the full SHA fea5ab1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3bfd0c9 - Browse repository at this point
Copy the full SHA 3bfd0c9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6297228 - Browse repository at this point
Copy the full SHA 6297228View commit details -
Auto merge of #72936 - jackh726:chalk-more, r=nikomatsakis
Upgrade Chalk Things done in this PR: - Upgrade Chalk to `0.11.0` - Added compare-mode=chalk - Bump rustc-hash in `librustc_data_structures` to `1.1.0` to match Chalk - Removed `RustDefId` since the builtin type support is there - Add a few more `FIXME(chalk)`s for problem spots I hit when running all tests with chalk - Added some more implementation code for some newer builtin Chalk types (e.g. `FnDef`, `Array`) - Lower `RegionOutlives` and `ObjectSafe` predicates - Lower `Dyn` without the region - Handle `Int`/`Float` `CanonicalVarKind`s - Uncomment some Chalk tests that actually work now - Remove the revisions in `src/test/ui/coherence/coherence-subtyping.rs` since they aren't doing anything different r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for a8cf399 - Browse repository at this point
Copy the full SHA a8cf399View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7447bf2 - Browse repository at this point
Copy the full SHA 7447bf2View commit details -
Do not send a notification for P-high stable regressions
Add comment to clarify the pattern
Configuration menu - View commit details
-
Copy full SHA for ae71e96 - Browse repository at this point
Copy the full SHA ae71e96View commit details -
Auto merge of #73180 - matthewjasper:predicate-cache, r=nikomatsakis
Cache flags and escaping vars for predicates With predicates becoming interned (rust-lang/compiler-team#285) this is now possible and could be a perf win. It would become an even larger win once we have recursive predicates. cc @lcnr @nikomatsakis r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 1a4e2b6 - Browse repository at this point
Copy the full SHA 1a4e2b6View commit details -
Configuration menu - View commit details
-
Copy full SHA for f60513e - Browse repository at this point
Copy the full SHA f60513eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1d3f49f - Browse repository at this point
Copy the full SHA 1d3f49fView commit details -
Configuration menu - View commit details
-
Copy full SHA for bd4f6f0 - Browse repository at this point
Copy the full SHA bd4f6f0View commit details
Commits on Jun 22, 2020
-
Fix spurious 'value moved here in previous iteration of loop' messages
Fixes #46099 Previously, we would check the 'move' and 'use' spans to see if we should emit this message. However, this can give false positives when macros are involved, since two distinct expressions may end up with the same span. Instead, we check the actual MIR `Location`, which eliminates false positives.
Configuration menu - View commit details
-
Copy full SHA for 953104e - Browse repository at this point
Copy the full SHA 953104eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 933fe80 - Browse repository at this point
Copy the full SHA 933fe80View commit details -
bootstrap: no
config.toml
exists regressionThis commit fixes a regression introduced in #73317 where an oversight meant that `config.toml` was assumed to exist. Signed-off-by: David Wood <david@davidtw.co>
Configuration menu - View commit details
-
Copy full SHA for b60ec47 - Browse repository at this point
Copy the full SHA b60ec47View commit details -
Configuration menu - View commit details
-
Copy full SHA for c474317 - Browse repository at this point
Copy the full SHA c474317View commit details -
Configuration menu - View commit details
-
Copy full SHA for 932237b - Browse repository at this point
Copy the full SHA 932237bView commit details -
Rollup merge of #71660 - sollyucko:master, r=dtolnay
impl PartialEq<Vec<B>> for &[A], &mut [A] rust-lang/rfcs#2917
Configuration menu - View commit details
-
Copy full SHA for 8da1dd0 - Browse repository at this point
Copy the full SHA 8da1dd0View commit details -
Rollup merge of #72623 - da-x:use-suggest-public-path, r=petrochenkov
Prefer accessible paths in 'use' suggestions This PR addresses issue #26454, where `use` suggestions are made for paths that don't work. For example: ```rust mod foo { mod bar { struct X; } } fn main() { X; } // suggests `use foo::bar::X;` ```
Configuration menu - View commit details
-
Copy full SHA for fdd241f - Browse repository at this point
Copy the full SHA fdd241fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d22b80d - Browse repository at this point
Copy the full SHA d22b80dView commit details -
Rollup merge of #73580 - RalfJung:deprecate-wrapping-offset-from, r=A…
…manieu deprecate wrapping_offset_from As per #41079 (comment) which seems like a consensus. r? @Amanieu
Configuration menu - View commit details
-
Copy full SHA for 35ecb26 - Browse repository at this point
Copy the full SHA 35ecb26View commit details -
Rollup merge of #73582 - RalfJung:miri-span-bug, r=oli-obk
Miri: replace many bug! by span_bug! r? @oli-obk
Configuration menu - View commit details
-
Copy full SHA for cb85f4b - Browse repository at this point
Copy the full SHA cb85f4bView commit details -
Rollup merge of #73585 - LeSeulArtichaut:patch-3, r=Mark-Simulacrum
Do not send a notification for P-high stable regressions This is kind of a hack to only match nightly and beta regressions, but not stable regressions. See my tests [on the playground](https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6ff8a809162118aa2951f2ff12400067). r? @spastorino cc @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for c5e6f48 - Browse repository at this point
Copy the full SHA c5e6f48View commit details -
Auto merge of #73617 - Dylan-DPC:rollup-zugh80o, r=Dylan-DPC
Rollup of 6 pull requests Successful merges: - #71660 (impl PartialEq<Vec<B>> for &[A], &mut [A]) - #72623 (Prefer accessible paths in 'use' suggestions) - #73502 (Add E0765) - #73580 (deprecate wrapping_offset_from) - #73582 (Miri: replace many bug! by span_bug!) - #73585 (Do not send a notification for P-high stable regressions) Failed merges: - #73581 (Create 0766 error code) r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 62878c2 - Browse repository at this point
Copy the full SHA 62878c2View commit details -
modify leak-check to track only outgoing edges from placeholders
Also, update the affected tests. This seems strictly better but it is actually more permissive than I initially intended. In particular it accepts this ``` forall<'a, 'b> { exists<'intersection> { 'a: 'intersection, 'b: 'intersection, } } ``` and I'm not sure I want to accept that. It implies that we have a `'empty` in the new universe intoduced by the `forall`.
Configuration menu - View commit details
-
Copy full SHA for bcc0a9c - Browse repository at this point
Copy the full SHA bcc0a9cView commit details -
Revert "modify leak-check to track only outgoing edges from placehold…
…ers" This reverts commit 2e01db4b396a1e161f7a73933fff34bc9421dba0.
Configuration menu - View commit details
-
Copy full SHA for 4199b3a - Browse repository at this point
Copy the full SHA 4199b3aView commit details -
rewrite leak check to be based on universes
In the new leak check, instead of getting a list of placeholders to track, we look for any placeholder that is part of a universe which was created during the snapshot. We are looking for the following error patterns: * P1: P2, where P1 != P2 * P1: R, where R is in some universe that cannot name P1 This new leak check is more precise than before, in that it accepts this patterns: * R: P1, even if R cannot name P1, because R = 'static is a valid sol'n * R: P1, R: P2, as above Note that this leak check, when running during subtyping, is less efficient than before in some sense because it is going to check and re-check all the universes created since the snapshot. We're going to move when the leak check runs to try and correct that.
Configuration menu - View commit details
-
Copy full SHA for f2cf994 - Browse repository at this point
Copy the full SHA f2cf994View commit details -
move leak-check to during coherence, candidate eval
In particular, it no longer occurs during the subtyping check. This is important for enabling lazy normalization, because the subtyping check will be producing sub-obligations that could affect its results. Consider an example like for<'a> fn(<&'a as Mirror>::Item) = fn(&'b u8) where `<T as Mirror>::Item = T` for all `T`. We will wish to produce a new subobligation like <'!1 as Mirror>::Item = &'b u8 This will, after being solved, ultimately yield a constraint that `'!1 = 'b` which will fail. But with the leak-check being performed on subtyping, there is no opportunity to normalize `<'!1 as Mirror>::Item` (unless we invoke that normalization directly from within subtyping, and I would prefer that subtyping and unification are distinct operations rather than part of the trait solving stack). The reason to keep the leak check during coherence and trait evaluation is partly for backwards compatibility. The coherence change permits impls for `fn(T)` and `fn(&T)` to co-exist, and the trait evaluation change means that we can distinguish those two cases without ambiguity errors. It also avoids recreating #57639, where we were incorrectly choosing a where clause that would have failed the leak check over the impl which succeeds. The other reason to keep the leak check in those places is that I think it is actually close to the model we want. To the point, I think the trait solver ought to have the job of "breaking down" higher-ranked region obligation like ``!1: '2` into into region obligations that operate on things in the root universe, at which point they should be handed off to polonius. The leak check isn't *really* doing that -- these obligations are still handed to the region solver to process -- but if/when we do adopt that model, the decision to pass/fail would be happening in roughly this part of the code. This change had somewhat more side-effects than I anticipated. It seems like there are cases where the leak-check was not being enforced during method proving and trait selection. I haven't quite tracked this down but I think it ought to be documented, so that we know what precisely we are committing to. One surprising test was `issue-30786.rs`. The behavior there seems a bit "fishy" to me, but the problem is not related to the leak check change as far as I can tell, but more to do with the closure signature inference code and perhaps the associated type projection, which together seem to be conspiring to produce an unexpected signature. Nonetheless, it is an example of where changing the leak-check can have some unexpected consequences: we're now failing to resolve a method earlier than we were, which suggests we might change some method resolutions that would have been ambiguous to be successful. TODO: * figure out remainig test failures * add new coherence tests for the patterns we ARE disallowing
Configuration menu - View commit details
-
Copy full SHA for 5a7a850 - Browse repository at this point
Copy the full SHA 5a7a850View commit details -
upcasting traits requires only that things become more general
Revert the code that states that upcasting traits requires full equality and change to require that the source type is a subtype of the target type, as one would expect. As the comment states, this was an old bug that we didn't want to fix yet as it interacted poorly with the old leak-check. This fixes the old-lub-glb-object test, which was previously reporting too many errors (i.e., in the previous commit).
Configuration menu - View commit details
-
Copy full SHA for 1e00e1b - Browse repository at this point
Copy the full SHA 1e00e1bView commit details -
Auto merge of #73415 - ehuss:update-cargo, r=ehuss
Update cargo 3 commits in 79c769c3d7b4c2cf6a93781575b7f592ef974255..089cbb80b73ba242efdcf5430e89f63fa3b5328d 2020-06-11 22:13:37 +0000 to 2020-06-15 14:38:34 +0000 - Support linker with -Zdoctest-xcompile. (rust-lang/cargo#8359) - Fix doctests not running with --target=HOST. (rust-lang/cargo#8358) - Allow passing a registry index url directly to `cargo install` (rust-lang/cargo#8344)
Configuration menu - View commit details
-
Copy full SHA for 6bb3dbf - Browse repository at this point
Copy the full SHA 6bb3dbfView commit details -
Configuration menu - View commit details
-
Copy full SHA for ad9972a - Browse repository at this point
Copy the full SHA ad9972aView commit details -
Configuration menu - View commit details
-
Copy full SHA for d3feb8b - Browse repository at this point
Copy the full SHA d3feb8bView commit details -
Stop using old version of
syn
inrustc-workspace-hack
None of the tools seem to need syn 0.15.35, so we can just build syn 1.0. This was causing an issue with clippy's `compile-test` program: since multiple versions of `syn` would exist in the build directory, we would non-deterministically pick one based on filesystem iteration order. If the pre-1.0 version of `syn` was picked, a strange build error would occur (see #73594 (comment)) To prevent this kind of issue from happening again, we now panic if we find multiple versions of a crate in the build directly, instead of silently picking the first version we find.
Configuration menu - View commit details
-
Copy full SHA for e2ab98d - Browse repository at this point
Copy the full SHA e2ab98dView commit details -
Point at the call spawn when overflow occurs during monomorphization
This improves the output for issue #72577, but there's still more work to be done. Currently, an overflow error during monomorphization results in an error that points at the function we were unable to monomorphize. However, we don't point at the call that caused the monomorphization to happen. In the overflow occurs in a large recursive function, it may be difficult to determine where the issue is. This commit tracks and `Span` information during collection of `MonoItem`s, which is used when emitting an overflow error. `MonoItem` itself is unchanged, so this only affects `src/librustc_mir/monomorphize/collector.rs`
Configuration menu - View commit details
-
Copy full SHA for 3ed96a6 - Browse repository at this point
Copy the full SHA 3ed96a6View commit details -
remove snapshot calls from "match" operations during select
Motivation: - we want to use leak-check sparingly, first off - these calls were essentially the same as doing the check during subtyping
Configuration menu - View commit details
-
Copy full SHA for 70cf33f - Browse repository at this point
Copy the full SHA 70cf33fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6873a76 - Browse repository at this point
Copy the full SHA 6873a76View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a68d56 - Browse repository at this point
Copy the full SHA 3a68d56View commit details -
Configuration menu - View commit details
-
Copy full SHA for be0d10f - Browse repository at this point
Copy the full SHA be0d10fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 93e2982 - Browse repository at this point
Copy the full SHA 93e2982View commit details -
Configuration menu - View commit details
-
Copy full SHA for c88a76e - Browse repository at this point
Copy the full SHA c88a76eView commit details -
fix subtle bug in NLL type checker
The bug was revealed by the behavior of the old-lub-glb-hr-noteq1.rs test. The old-lub-glb-hr-noteq2 test shows the current 'order dependent' behavior of coercions around higher-ranked functions, at least when running with `-Zborrowck=mir`. Also, run compare-mode=nll.
Configuration menu - View commit details
-
Copy full SHA for 6929013 - Browse repository at this point
Copy the full SHA 6929013View commit details -
Configuration menu - View commit details
-
Copy full SHA for d57689f - Browse repository at this point
Copy the full SHA d57689fView commit details -
Auto merge of #73594 - Aaron1011:revert/move-fn-self-msg, r=Manishearth
Revert PR #72389 - "Explain move errors that occur due to method calls involving `self" r? @petrochenkov
Configuration menu - View commit details
-
Copy full SHA for cbf356a - Browse repository at this point
Copy the full SHA cbf356aView commit details -
implemented query for coverage data
This commit adds a query that allows the CoverageData to be pulled from a call on tcx, avoiding the need to change the `codegen_intrinsic_call()` signature (no need to pass in the FunctionCx or any additional arguments. The commit does not change where/when the CoverageData is computed. It's still done in the `pass`, and saved in the MIR `Body`. See discussion (in progress) here: #73488 (comment)
Configuration menu - View commit details
-
Copy full SHA for f4a7938 - Browse repository at this point
Copy the full SHA f4a7938View commit details -
Configuration menu - View commit details
-
Copy full SHA for f84b7e1 - Browse repository at this point
Copy the full SHA f84b7e1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 994d9d0 - Browse repository at this point
Copy the full SHA 994d9d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3eb8eb9 - Browse repository at this point
Copy the full SHA 3eb8eb9View commit details
Commits on Jun 23, 2020
-
Auto merge of #73007 - yoshuawuyts:socketaddr-from-string-u16, r=sfac…
…kler impl ToSocketAddrs for (String, u16) This adds a convenience impl of `ToSocketAddrs for (String, u16)`. When authoring HTTP services it's common to take command line options for `host` and `port` and parse them into `String` and `u16` respectively. Consider the following program: ```rust #[derive(Debug, StructOpt)] struct Config { host: String, port: u16, } async fn main() -> io::Result<()> { let config = Config::from_args(); let stream = TcpStream::connect((&*config.host, config.port))?; // &* is not ideal // ... } ``` Networking is a pretty common starting point for people new to Rust, and seeing `&*` in basic examples can be confusing. Even as someone that has experience with networking in Rust I tend to forget that `String` can't be passed directly there. Instead with this patch we can omit the `&*` conversion and pass `host` directly: ```rust #[derive(Debug, StructOpt)] struct Config { host: String, port: u16, } async fn main() -> io::Result<()> { let config = Config::from_args(); let stream = TcpStream::connect((config.host, config.port))?; // no more conversions! // ... } ``` I think should be an easy and small ergonomics improvement for networking. Thanks!
Configuration menu - View commit details
-
Copy full SHA for dcd470f - Browse repository at this point
Copy the full SHA dcd470fView commit details -
Rollup merge of #71756 - carstenandrich:master, r=dtolnay
add Windows system error codes that should map to io::ErrorKind::TimedOut closes #71646 **Disclaimer:** The author of this pull request has a negligible amount of experience (i.e., kinda zero) with the Windows API. This PR should _definitely_ be reviewed by someone familiar with the API and its error handling. While porting POSIX software using serial ports to Windows, I found that for many Windows system error codes, an `io::Error` created via `io::Error::from_raw_os_error()` or `io::Error::last_os_error()` is not `io::ErrorKind::TimedOut`. For example, when a (non-overlapped) write to a COM port via [`WriteFile()`](https://docs.microsoft.com/en-us/windows/win32/api/fileapi/nf-fileapi-readfile) times out, [`GetLastError()`](https://docs.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-getlasterror) returns `ERROR_SEM_TIMEOUT` ([121](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-)). However, an `io::Error` created from this error code will have `io::ErrorKind::Other`. Currently, only the error codes `ERROR_OPERATION_ABORTED` and `WSAETIMEDOUT` will instantiate `io::Error`s with kind `io::ErrorKind::TimedOut`. This makes `io::Error::last_os_error()` unsuitable for error handling of syscalls that could time out, because timeouts can not be caught by matching the error's kind against `io::ErrorKind::TimedOut`. Downloading the [list of Windows system error codes](https://gist.github.com/carstenandrich/c331d557520b8a0e7f44689ca257f805) and grepping anything that sounds like a timeout (`egrep -i "timed?.?(out|limit)"`), I've identified the following error codes that should also have `io::ErrorKind::TimedOut`, because they could be I/O-related: Name | Code | Description --- | --- | --- `ERROR_SEM_TIMEOUT` | [121](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-) | The semaphore timeout period has expired. `WAIT_TIMEOUT` | [258](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--0-499-) | The wait operation timed out. `ERROR_DRIVER_CANCEL_TIMEOUT` | [594](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--500-999-) | The driver %hs failed to complete a cancelled I/O request in the allotted time. `ERROR_COUNTER_TIMEOUT` | [1121](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--1000-1299-) | A serial I/O operation completed because the timeout period expired. The IOCTL_SERIAL_XOFF_COUNTER did not reach zero.) `ERROR_TIMEOUT` | [1460](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--1300-1699-) | This operation returned because the timeout period expired. `ERROR_CTX_MODEM_RESPONSE_TIMEOUT` | [7012](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--6000-8199-) | The modem did not respond to the command sent to it. Verify that the modem is properly cabled and powered on. `ERROR_CTX_CLIENT_QUERY_TIMEOUT` | [7040](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--6000-8199-) | The client failed to respond to the server connect message. `ERROR_DS_TIMELIMIT_EXCEEDED` | [8226](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--8200-8999-) | The time limit for this request was exceeded. `DNS_ERROR_RECORD_TIMED_OUT` | [9705](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--9000-11999-) | DNS record timed out. `ERROR_IPSEC_IKE_TIMED_OUT` | [13805](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--12000-15999-) | Negotiation timed out. The following errors are also timeouts, but they don't seem to be directly related to I/O or network operations: Name | Code | Description --- | --- | --- `ERROR_SERVICE_REQUEST_TIMEOUT` | [1053](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--1000-1299-) | The service did not respond to the start or control request in a timely fashion. `ERROR_RESOURCE_CALL_TIMED_OUT` | [5910](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--4000-5999-) | The call to the cluster resource DLL timed out. `FRS_ERR_SYSVOL_POPULATE_TIMEOUT` | [8014](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--6000-8199-) | The file replication service cannot populate the system volume because of an internal timeout. The event log may have more information. `ERROR_RUNLEVEL_SWITCH_TIMEOUT` | [15402](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--12000-15999-) | The requested run level switch cannot be completed successfully since one or more services will not stop or restart within the specified timeout. `ERROR_RUNLEVEL_SWITCH_AGENT_TIMEOUT` | [15403](https://docs.microsoft.com/en-us/windows/win32/debug/system-error-codes--12000-15999-) | A run level switch agent did not respond within the specified timeout. Please note that `ERROR_SEM_TIMEOUT` is the only timeout error I have [seen in action](https://gist.github.com/carstenandrich/10b3962fa1abc9e50816b6460010900b). The remainder of the error codes listed above is based purely on reading documentation. This pull request adds all of the errors listed in both tables, but I'm not sure whether adding all of them makes sense. Someone with actual Windows API experience should decide that. I expect these changes to be fairly backwards compatible, because only the error's [`.kind()`](https://doc.rust-lang.org/std/io/struct.Error.html#method.kind) will change, but matching the error's code via [`.raw_os_error()`](https://doc.rust-lang.org/std/io/struct.Error.html#method.raw_os_error) will not be affected. However, code expecting these errors to be `io::ErrorKind::Other` would break. Even though I personally do not think such an implementation would make sense, after all the docs say that `io::ErrorKind` is _intended to grow over time_, a residual risk remains, of course. I took the liberty to ammend the docstring of `io::ErrorKind::Other` with a remark that discourages matching against it. As per the contributing guidelines I'm adding @steveklabnik due to the changed documentation. Also @retep998 might have some valuable insights on the error codes. r? @steveklabnik cc @retep998 cc @Mark-Simulacrum
Configuration menu - View commit details
-
Copy full SHA for 6276c13 - Browse repository at this point
Copy the full SHA 6276c13View commit details -
Rollup merge of #73495 - Lucretiel:wasi-io-impls, r=sfackler
Converted all platform-specific stdin/stdout/stderr implementations to use io:: traits Currently, some of the platform-specific standard streams (`src/libstd/sys/*/stdio.rs`) manually implement parts of the `io::Write` interface directly as methods on the struct, rather than by actually implementing the trait. There doesn't seem to be any reason for this, other than an unused advantage of `fn write(&self, ...)` instead of `fn write(&mut self, ...)`. Unfortunately, this means that those implementations don't have the default-implemented io methods, like `read_exact` and `write_all`. This caused #72705, which adds forwarding methods to the user-facing standard stream implementations, to fail to compile on those platforms. This change converts *all* such standard stream structs to use the standard library traits. This change should not cause any breakages, because the changed types are not publicly exported, and in fact are only ever used in `src/libstd/io/stdio.rs`.
Configuration menu - View commit details
-
Copy full SHA for 5426586 - Browse repository at this point
Copy the full SHA 5426586View commit details -
Rollup merge of #73575 - dario23:typo-errorcodes-doc, r=matthewjasper
Fix typo in error_codes doc
Configuration menu - View commit details
-
Copy full SHA for 4dfae77 - Browse repository at this point
Copy the full SHA 4dfae77View commit details -
Rollup merge of #73578 - RalfJung:ty-ctxt-at, r=jonas-schievink
Make is_freeze and is_copy_modulo_regions take TyCtxtAt Make is_freeze and is_copy_modulo_regions take TyCtxtAt instead of separately taking TyCtxt and Span. This is consistent with is_sized.
Configuration menu - View commit details
-
Copy full SHA for 963a480 - Browse repository at this point
Copy the full SHA 963a480View commit details -
Rollup merge of #73586 - RalfJung:switch-ty, r=oli-obk
switch_ty is redundant This field is redundant, but we cannot remove it currently as pretty-printing relies on it (and it does not have access to `mir::Body` to compute the type itself). Cc @oli-obk @matthewjasper @jonas-schievink
Configuration menu - View commit details
-
Copy full SHA for 490d820 - Browse repository at this point
Copy the full SHA 490d820View commit details -
Rollup merge of #73600 - Aaron1011:fix/move-in-macro, r=ecstatic-morse
Fix spurious 'value moved here in previous iteration of loop' messages Fixes #46099 Previously, we would check the 'move' and 'use' spans to see if we should emit this message. However, this can give false positives when macros are involved, since two distinct expressions may end up with the same span. Instead, we check the actual MIR `Location`, which eliminates false positives.
Configuration menu - View commit details
-
Copy full SHA for b3d99cb - Browse repository at this point
Copy the full SHA b3d99cbView commit details -
Rollup merge of #73610 - GuillaumeGomez:cleanup-e0699, r=Dylan-DPC
Clean up E0699 explanation r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for e979392 - Browse repository at this point
Copy the full SHA e979392View commit details -
Configuration menu - View commit details
-
Copy full SHA for 08ec4cb - Browse repository at this point
Copy the full SHA 08ec4cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d0192e - Browse repository at this point
Copy the full SHA 3d0192eView commit details -
using "mir_body" (vs "body") in InstrumentCoverage
The mod uses both MIR bodies and HIR bodies, so I'm trying to maintain consistency with these names.
Configuration menu - View commit details
-
Copy full SHA for a045140 - Browse repository at this point
Copy the full SHA a045140View commit details -
Auto merge of #73635 - Dylan-DPC:rollup-b4wbp42, r=Dylan-DPC
Rollup of 7 pull requests Successful merges: - #71756 (add Windows system error codes that should map to io::ErrorKind::TimedOut) - #73495 (Converted all platform-specific stdin/stdout/stderr implementations to use io:: traits) - #73575 (Fix typo in error_codes doc) - #73578 (Make is_freeze and is_copy_modulo_regions take TyCtxtAt) - #73586 (switch_ty is redundant) - #73600 (Fix spurious 'value moved here in previous iteration of loop' messages) - #73610 (Clean up E0699 explanation) Failed merges: r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 3b1c08c - Browse repository at this point
Copy the full SHA 3b1c08cView commit details -
Updated query for num_counters to compute from max index
Also added FIXME comments to note the possible need to accommodate counter increment calls in source-based functions that differ from the function context of the caller instance (e.g., inline functions).
Configuration menu - View commit details
-
Copy full SHA for 977ce57 - Browse repository at this point
Copy the full SHA 977ce57View commit details -
Rollup merge of #72271 - rakshith-ravi:master, r=varkor
Improve compiler error message for wrong generic parameter order - Added optional "help" parameter that shows a help message on the compiler error if required. - Added a simple ordered parameter as a sample help. @varkor will make more changes as required. Let me know if I'm heading in the right direction. Fixes #68437 r? @varkor
Configuration menu - View commit details
-
Copy full SHA for 59e87c0 - Browse repository at this point
Copy the full SHA 59e87c0View commit details -
Rollup merge of #72493 - nikomatsakis:move-leak-check, r=matthewjasper
move leak-check to during coherence, candidate eval Implementation of MCP rust-lang/compiler-team#295. I'd like to do a crater run on this. Note to @rust-lang/lang: This PR is a breaking change (bugfix). It causes tests like the following to go from a future-compatibility warning #56105 to a hard error: ```rust trait Trait {} impl Trait for for<'a, 'b> fn(&'a u32, &'b u32) {} impl Trait for for<'c> fn(&'c u32, &'c u32) {} // now rejected, used to warn ``` I am not aware of any instances of this code in the wild, but that is why we are doing a crater run. The reason for this change is that those two types are, in fact, the same type, and hence the two impls are overlapping. There will still be impls that trigger #56105 after this lands, however -- I hope that we will eventually just accept those impls without warning, for the most part. One example of such an impl is this pattern, which is used by wasm-bindgen and other crates as well: ```rust trait Trait {} impl<T> Trait for fn(&T) { } impl<T> Trait for fn(T) { } // still accepted, but warns ```
Configuration menu - View commit details
-
Copy full SHA for 903823c - Browse repository at this point
Copy the full SHA 903823cView commit details -
Rollup merge of #73398 - oli-obk:const_raw_ptr_cmp, r=varkor,RalfJung…
Configuration menu - View commit details
-
Copy full SHA for ae38698 - Browse repository at this point
Copy the full SHA ae38698View commit details -
Rollup merge of #73472 - GuillaumeGomez:cleanup-e0689, r=Dylan-DPC
Clean up E0689 explanation r? @Dylan-DPC
Configuration menu - View commit details
-
Copy full SHA for 98aa34c - Browse repository at this point
Copy the full SHA 98aa34cView commit details -
Rollup merge of #73496 - estebank:opaque-missing-lts-in-fn-3, r=nikom…
…atsakis Account for multiple impl/dyn Trait in return type when suggesting `'_` Make `impl` and `dyn` Trait lifetime suggestions a bit more resilient. Follow up to #72804. r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for cd18ac1 - Browse repository at this point
Copy the full SHA cd18ac1View commit details -
Rollup merge of #73515 - christianpoveda:livedrop-diagnostics, r=oli-obk
Add second message for LiveDrop errors This is an attempt to fix #72907 by adding a second message to the `LiveDrop` diagnostics. Changing from this ``` error[E0493]: destructors cannot be evaluated at compile-time --> src/lib.rs:7:9 | 7 | let mut always_returned = None; | ^^^^^^^^^^^^^^^^^^^ constants cannot evaluate destructors error: aborting due to previous error ``` to this ``` error[E0493]: destructors cannot be evaluated at compile-time --> foo.rs:6:9 | 6 | let mut always_returned = None; | ^^^^^^^^^^^^^^^^^^^ constants cannot evaluate destructors ... 10 | always_returned = never_returned; | --------------- value is dropped here error: aborting due to previous error ``` r? @RalfJung @ecstatic-morse
Configuration menu - View commit details
-
Copy full SHA for 0f9a6ed - Browse repository at this point
Copy the full SHA 0f9a6edView commit details -
Rollup merge of #73567 - adetaylor:extern-doc-fix, r=dtolnay
Clarify --extern documentation. Fixes #64731, #73531. See also #64402 (comment)
Configuration menu - View commit details
-
Copy full SHA for 0560151 - Browse repository at this point
Copy the full SHA 0560151View commit details -
Rollup merge of #73572 - JOE1994:patch-4, r=jonas-schievink
Fix typos in doc comments Hello 🦀 , This commit fixes typos in the doc comments of 'librustc_mir/monomorphize/collector.rs' Thank you for reviewing this PR 👍
Configuration menu - View commit details
-
Copy full SHA for 84bd1e7 - Browse repository at this point
Copy the full SHA 84bd1e7View commit details -
Rollup merge of #73590 - davidtwco:bootstrap-fix-config-env-var, r=Ma…
Configuration menu - View commit details
-
Copy full SHA for 44900f8 - Browse repository at this point
Copy the full SHA 44900f8View commit details -
Auto merge of #73643 - Manishearth:rollup-68dr8fz, r=Manishearth
Rollup of 9 pull requests Successful merges: - #72271 (Improve compiler error message for wrong generic parameter order) - #72493 ( move leak-check to during coherence, candidate eval) - #73398 (A way forward for pointer equality in const eval) - #73472 (Clean up E0689 explanation) - #73496 (Account for multiple impl/dyn Trait in return type when suggesting `'_`) - #73515 (Add second message for LiveDrop errors) - #73567 (Clarify --extern documentation.) - #73572 (Fix typos in doc comments) - #73590 (bootstrap: no `config.toml` exists regression) Failed merges: r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 1557fb0 - Browse repository at this point
Copy the full SHA 1557fb0View commit details -
The const propagator cannot trace references.
Thus we avoid propagation of a local the moment we encounter references to it.
Configuration menu - View commit details
-
Copy full SHA for 5fa8b08 - Browse repository at this point
Copy the full SHA 5fa8b08View commit details -
rustdoc: Fix doc aliases with crate filtering
Fix a crash when searching for an alias contained in the currently selected filter crate. Also remove alias search results for crates that should be filtered out. The test suite needed to be fixed to actually take into account the crate filtering and check that there are no results when none are expected.
Configuration menu - View commit details
-
Copy full SHA for 478750c - Browse repository at this point
Copy the full SHA 478750cView commit details -
rustc: Modernize wasm checks for atomics
This commit modernizes how rustc checks for whether the `atomics` feature is enabled for the wasm target. The `sess.target_features` set is consulted instead of fiddling around with dealing with various aspects of LLVM and that syntax.
Configuration menu - View commit details
-
Copy full SHA for 0c2b025 - Browse repository at this point
Copy the full SHA 0c2b025View commit details -
Auto merge of #73644 - ollie27:rustdoc_alias_filter, r=GuillaumeGomez
rustdoc: Fix doc aliases with crate filtering Fix a crash when searching for an alias contained in the currently selected filter crate. Also remove alias search results for crates that should be filtered out. The test suite needed to be fixed to actually take into account the crate filtering and check that there are no results when none are expected. Needs to be backported to beta to fix the `std` docs. Fixes #73620 r? @GuillaumeGomez
Configuration menu - View commit details
-
Copy full SHA for ff5b446 - Browse repository at this point
Copy the full SHA ff5b446View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e8aa1f - Browse repository at this point
Copy the full SHA 6e8aa1fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7d2fba1 - Browse repository at this point
Copy the full SHA 7d2fba1View commit details -
Rollup merge of #72876 - TrolledWoods:patch-2, r=Dylan-DPC
Mention that BTreeMap::new() doesn't allocate I think it would be nice to mention this, so you don't have to dig through the src to look at the definition of new().
Configuration menu - View commit details
-
Copy full SHA for 317a151 - Browse repository at this point
Copy the full SHA 317a151View commit details -
Rollup merge of #73244 - ecstatic-morse:validate-generator-mir, r=tma…
…ndry 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 #73137. Namely, a store between two generator saved locals whose storage does not conflict. My ultimate goal is to introduce a modified version of #71956 that handles this case properly. r? @tmandry
Configuration menu - View commit details
-
Copy full SHA for 781b589 - Browse repository at this point
Copy the full SHA 781b589View commit details -
Rollup merge of #73488 - richkadel:llvm-coverage-map-gen, r=tmandry
code coverage foundation for hash and num_counters This PR is the next iteration after PR #73011 (which is still waiting on bors to merge). @wesleywiser - PTAL r? @tmandry (FYI, I'm also working on injecting the coverage maps, in another branch, while waiting for these to merge.) Thanks!
Configuration menu - View commit details
-
Copy full SHA for f5e46fe - Browse repository at this point
Copy the full SHA f5e46feView commit details -
Rollup merge of #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 505cf52 - Browse repository at this point
Copy the full SHA 505cf52View commit details -
Rollup merge of #73587 - marmeladema:hir-id-ification-final, r=petroc…
…henkov Move remaining `NodeId` APIs from `Definitions` to `Resolver` Implements #73291 (comment) TL;DR: it moves all fields that are only needed during name resolution passes into the `Resolver` and keep the rest in `Definitions`. This effectively enforces that all references to `NodeId`s are gone once HIR lowering is completed. After this, the only remaining work for #50928 should be to adjust the dev guide. r? @petrochenkov
Configuration menu - View commit details
-
Copy full SHA for 045761c - Browse repository at this point
Copy the full SHA 045761cView commit details -
Rollup merge of #73601 - Aaron1011:fix/better-mono-overflow-err, r=ec…
…static-morse Point at the call span when overflow occurs during monomorphization This improves the output for issue #72577, but there's still more work to be done. Currently, an overflow error during monomorphization results in an error that points at the function we were unable to monomorphize. However, we don't point at the call that caused the monomorphization to happen. In the overflow occurs in a large recursive function, it may be difficult to determine where the issue is. This commit tracks and `Span` information during collection of `MonoItem`s, which is used when emitting an overflow error. `MonoItem` itself is unchanged, so this only affects `src/librustc_mir/monomorphize/collector.rs`
Configuration menu - View commit details
-
Copy full SHA for 30fba22 - Browse repository at this point
Copy the full SHA 30fba22View commit details -
Rollup merge of #73613 - oli-obk:const_prop_miscompile, r=wesleywiser
The const propagator cannot trace references. Thus we avoid propagation of a local the moment we encounter references to it. fixes #73609 cc @RalfJung r? @wesleywiser
Configuration menu - View commit details
-
Copy full SHA for d8b4604 - Browse repository at this point
Copy the full SHA d8b4604View commit details -
Rollup merge of #73614 - lcnr:patch-4, r=Dylan-DPC
fix `intrinsics::needs_drop` docs
Configuration menu - View commit details
-
Copy full SHA for f7d5687 - Browse repository at this point
Copy the full SHA f7d5687View commit details -
Rollup merge of #73630 - estebank:fn-item-e0308, r=davidtwco
Provide context on E0308 involving fn items Fix #73487.
Configuration menu - View commit details
-
Copy full SHA for 4f2e540 - Browse repository at this point
Copy the full SHA 4f2e540View commit details -
Rollup merge of #73665 - alexcrichton:update-wasm-atomics-feature, r=…
…davidtwco rustc: Modernize wasm checks for atomics This commit modernizes how rustc checks for whether the `atomics` feature is enabled for the wasm target. The `sess.target_features` set is consulted instead of fiddling around with dealing with various aspects of LLVM and that syntax.
Configuration menu - View commit details
-
Copy full SHA for 6ed6a84 - Browse repository at this point
Copy the full SHA 6ed6a84View commit details -
Auto merge of #73669 - Manishearth:rollup-0n4u7vq, r=Manishearth
Rollup of 11 pull requests Successful merges: - #72780 (Enforce doc alias check) - #72876 (Mention that BTreeMap::new() doesn't allocate) - #73244 (Check for assignments between non-conflicting generator saved locals) - #73488 (code coverage foundation for hash and num_counters) - #73523 (Fix -Z unpretty=everybody_loops) - #73587 (Move remaining `NodeId` APIs from `Definitions` to `Resolver`) - #73601 (Point at the call span when overflow occurs during monomorphization) - #73613 (The const propagator cannot trace references.) - #73614 (fix `intrinsics::needs_drop` docs) - #73630 (Provide context on E0308 involving fn items) - #73665 (rustc: Modernize wasm checks for atomics) Failed merges: r? @ghost
Configuration menu - View commit details
-
Copy full SHA for 0c04344 - Browse repository at this point
Copy the full SHA 0c04344View commit details
Commits on Jun 24, 2020
-
Auto merge of #73293 - Aaron1011:feature/macro-rules-arg-capture, r=p…
…etrochenkov Always capture tokens for `macro_rules!` arguments When we invoke a proc-macro, the `TokenStream` we pass to it may contain 'interpolated' AST fragments, represented by `rustc_ast::token::Nonterminal`. In order to correctly, pass a `Nonterminal` to a proc-macro, we need to have 'captured' its `TokenStream` at the time the AST was parsed. Currently, we perform this capturing when attributes are present on items and expressions, since we will end up using a `Nonterminal` to pass the item/expr to any proc-macro attributes it is annotated with. However, `Nonterminal`s are also introduced by the expansion of metavariables in `macro_rules!` macros. Since these metavariables may be passed to proc-macros, we need to have tokens available to avoid the need to pretty-print and reparse (see #43081). This PR unconditionally performs token capturing for AST items and expressions that are passed to a `macro_rules!` invocation. We cannot know in advance if captured item/expr will be passed to proc-macro, so this is needed to ensure that tokens will always be available when they are needed. This ensures that proc-macros will receive tokens with proper `Spans` (both location and hygiene) in more cases. Like all work on #43081, this will cause regressions in proc-macros that were relying on receiving tokens with dummy spans. In this case, Crater revealed only one regression: the [Pear](https://github.com/SergioBenitez/Pear) crate (a helper for [rocket](https://github.com/SergioBenitez/Rocket)), which was previously [fixed](SergioBenitez/Pear#25) as part of #73084. This regression manifests itself as the following error: ``` [INFO] [stdout] error: proc macro panicked [INFO] [stdout] --> /opt/rustwide/cargo-home/registry/src/github.com-1ecc6299db9ec823/rocket_http-0.4.5/src/parse/uri/parser.rs:119:34 [INFO] [stdout] | [INFO] [stdout] 119 | let path_and_query = pear_try!(path_and_query(is_pchar)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = help: message: called `Option::unwrap()` on a `None` value [INFO] [stdout] = note: this error originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info) ``` It can be fixed by running `cargo update -p pear`, which updates your `Cargo.lock` to use the latest version of Pear (which includes a bugfix for the regression). Split out from #73084
Configuration menu - View commit details
-
Copy full SHA for 3c90ae8 - Browse repository at this point
Copy the full SHA 3c90ae8View commit details