-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 12 pull requests #70085
Rollup of 12 pull requests #70085
Commits on Feb 10, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 14bcf0a - Browse repository at this point
Copy the full SHA 14bcf0aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 16a23e7 - Browse repository at this point
Copy the full SHA 16a23e7View commit details
Commits on Mar 11, 2020
-
Compute the correct layout for variants of uninhabited enums and read…
…d a long lost assertion This reverts part of commit 9712fa4.
Configuration menu - View commit details
-
Copy full SHA for cdc7304 - Browse repository at this point
Copy the full SHA cdc7304View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec88ffa - Browse repository at this point
Copy the full SHA ec88ffaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 74608c7 - Browse repository at this point
Copy the full SHA 74608c7View commit details -
miri: categorize errors into "unsupported" and "UB"
Also slightly refactor pointer bounds checks to avoid creating unnecessary temporary Errors
Configuration menu - View commit details
-
Copy full SHA for f5efb68 - Browse repository at this point
Copy the full SHA f5efb68View commit details -
Configuration menu - View commit details
-
Copy full SHA for d02543a - Browse repository at this point
Copy the full SHA d02543aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a95b01 - Browse repository at this point
Copy the full SHA 9a95b01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3ebcd78 - Browse repository at this point
Copy the full SHA 3ebcd78View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2764d3d - Browse repository at this point
Copy the full SHA 2764d3dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3e61442 - Browse repository at this point
Copy the full SHA 3e61442View commit details -
Configuration menu - View commit details
-
Copy full SHA for d8f8168 - Browse repository at this point
Copy the full SHA d8f8168View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9681422 - Browse repository at this point
Copy the full SHA 9681422View commit details -
Configuration menu - View commit details
-
Copy full SHA for 93436d8 - Browse repository at this point
Copy the full SHA 93436d8View commit details -
Configuration menu - View commit details
-
Copy full SHA for e219dd4 - Browse repository at this point
Copy the full SHA e219dd4View commit details
Commits on Mar 13, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 349fcb9 - Browse repository at this point
Copy the full SHA 349fcb9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3f45da0 - Browse repository at this point
Copy the full SHA 3f45da0View commit details -
Configuration menu - View commit details
-
Copy full SHA for be10f14 - Browse repository at this point
Copy the full SHA be10f14View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc738f2 - Browse repository at this point
Copy the full SHA bc738f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c48c89 - Browse repository at this point
Copy the full SHA 3c48c89View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2e46faa - Browse repository at this point
Copy the full SHA 2e46faaView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9a53cf3 - Browse repository at this point
Copy the full SHA 9a53cf3View commit details -
tidy: Remove chalk-engine/chalk-macros.
Removed in rust-lang#69247 while this PR was waiting to merge.
Configuration menu - View commit details
-
Copy full SHA for ed0158d - Browse repository at this point
Copy the full SHA ed0158dView commit details -
Properly handle Spans that reference imported SourceFiles
Previously, metadata encoding used DUMMY_SP to represent any spans that referenced an 'imported' SourceFile - e.g. a SourceFile from an upstream dependency. These leads to sub-optimal error messages in certain cases (see the included test). This PR changes how we encode and decode spans in crate metadata. We encode spans in one of two ways: * 'Local' spans, which reference non-imported SourceFiles, are encoded exactly as before. * 'Foreign' spans, which reference imported SourceFiles, are encoded with the CrateNum of their 'originating' crate. Additionally, their 'lo' and 'high' values are rebased on top of the 'originating' crate, which allows them to be used with the SourceMap data encoded for that crate. The `ExternalSource` enum is renamed to `ExternalSourceKind`. There is now a struct called `ExternalSource`, which holds an `ExternalSourceKind` along with the original line number information for the file. This is used during `Span` serialization to rebase spans onto their 'owning' crate.
Configuration menu - View commit details
-
Copy full SHA for 76c7144 - Browse repository at this point
Copy the full SHA 76c7144View commit details
Commits on Mar 15, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 51ea260 - Browse repository at this point
Copy the full SHA 51ea260View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc8ff3f - Browse repository at this point
Copy the full SHA bc8ff3fView commit details
Commits on Mar 16, 2020
-
Configuration menu - View commit details
-
Copy full SHA for b9167e6 - Browse repository at this point
Copy the full SHA b9167e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f44857 - Browse repository at this point
Copy the full SHA 2f44857View commit details -
Configuration menu - View commit details
-
Copy full SHA for e78c451 - Browse repository at this point
Copy the full SHA e78c451View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5654cde - Browse repository at this point
Copy the full SHA 5654cdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for d964e60 - Browse repository at this point
Copy the full SHA d964e60View commit details -
Update src/librustdoc/html/static/main.js
Fix variable name Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 496256c - Browse repository at this point
Copy the full SHA 496256cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9b85213 - Browse repository at this point
Copy the full SHA 9b85213View commit details -
Configuration menu - View commit details
-
Copy full SHA for cff1182 - Browse repository at this point
Copy the full SHA cff1182View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8cf33b0 - Browse repository at this point
Copy the full SHA 8cf33b0View commit details
Commits on Mar 17, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 5a9ccc9 - Browse repository at this point
Copy the full SHA 5a9ccc9View commit details -
Don't use
TypeckTables
in NiceRegionErrorRegions in TypeckTables will be erased, so are unusable for error reporting.
Configuration menu - View commit details
-
Copy full SHA for cefd030 - Browse repository at this point
Copy the full SHA cefd030View commit details -
Also skip duplicated region solving entirely with `-Zborrowck=mir`.
Configuration menu - View commit details
-
Copy full SHA for 0a7f16e - Browse repository at this point
Copy the full SHA 0a7f16eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ee5829 - Browse repository at this point
Copy the full SHA 1ee5829View commit details -
Fix abort-on-eprintln during process shutdown
This commit fixes an issue where if `eprintln!` is used in a TLS destructor it can accidentally cause the process to abort. TLS destructors are executed after `main` returns on the main thread, and at this point we've also deinitialized global `Lazy` values like those which store the `Stderr` and `Stdout` internals. This means that despite handling TLS not being accessible in `eprintln!`, we will fail due to not being able to call `stderr()`. This means that we'll double-panic quickly because panicking also attempt to write to stderr. The fix here is to reimplement the global stderr handle to avoid the need for destruction. This avoids the need for `Lazy` as well as the hidden panic inside of the `stderr` function. Overall this should improve the robustness of printing errors and/or panics in weird situations, since the `stderr` accessor should be infallible in more situations.
Configuration menu - View commit details
-
Copy full SHA for a4cbcb2 - Browse repository at this point
Copy the full SHA a4cbcb2View commit details -
std: Don't abort process when printing panics in tests
This commit fixes an issue when using `set_print` and friends, notably used by libtest, to avoid aborting the process if printing panics. This previously panicked due to borrowing a mutable `RefCell` twice, and this is worked around by borrowing these cells for less time, instead taking out and removing contents temporarily. Closes rust-lang#69558
Configuration menu - View commit details
-
Copy full SHA for 773c04c - Browse repository at this point
Copy the full SHA 773c04cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3314a34 - Browse repository at this point
Copy the full SHA 3314a34View commit details -
Configuration menu - View commit details
-
Copy full SHA for bdaf9e4 - Browse repository at this point
Copy the full SHA bdaf9e4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 37bee6d - Browse repository at this point
Copy the full SHA 37bee6dView commit details -
Rollup merge of rust-lang#68915 - timvermeulen:non_fused_iter, r=Amanieu
Fix bugs in Peekable and Flatten when using non-fused iterators I fixed a couple of bugs with regard to the `Peekable` and `Flatten`/`FlatMap` iterators when the underlying iterator isn't fused. For testing, I also added a `NonFused` iterator wrapper that panics when `next` or `next_back` is called on an iterator that has returned `None` before, which will hopefully make it easier to spot these mistakes in the future. ### Peekable `Peekable::next_back` was implemented as ```rust self.iter.next_back().or_else(|| self.peeked.take().and_then(|x| x)) ``` which is incorrect because when the `peeked` field is `Some(None)`, then `None` has already been returned from the inner iterator and what it returns from `next_back` can no longer be relied upon. `test_peekable_non_fused` tests this. ### Flatten When a `FlattenCompat` instance only has a `backiter` remaining (i.e. `self.frontiter` is `None` and `self.iter` is empty), then `next` will call `self.iter.next()` every time, so the `iter` field needs to be fused. I fixed it by giving it the type `Fuse<I>` instead of `I`, I think this is the only way to fix it. `test_flatten_non_fused_outer` tests this. Furthermore, previously `FlattenCompat::next` did not set `self.frontiter` to `None` after it returned `None`, which is incorrect when the inner iterator type isn't fused. I just delegated it to `try_fold` because that already handles it correctly. `test_flatten_non_fused_inner` tests this. r? @scottmcm
Configuration menu - View commit details
-
Copy full SHA for 9825d5c - Browse repository at this point
Copy the full SHA 9825d5cView commit details -
Rollup merge of rust-lang#68941 - Aaron1011:fix/imported-span, r=petr…
…ochenkov Properly handle Spans that reference imported SourceFiles Previously, metadata encoding used DUMMY_SP to represent any spans that referenced an 'imported' SourceFile - e.g. a SourceFile from an upstream dependency. This currently has no visible consequences, since these kinds of spans don't currently seem to be emitted anywhere. However, there's no reason that we couldn't start using such spans in diagnostics. This PR changes how we encode and decode spans in crate metadata. We encode spans in one of two ways: * 'Local' spans, which reference non-imported SourceFiles, are encoded exactly as before. * 'Foreign' spans, which reference imported SourceFiles, are encoded with the CrateNum of their 'originating' crate. Additionally, their 'lo' and 'high' values are rebased on top of the 'originating' crate, which allows them to be used with the SourceMap data encoded for that crate. To support this change, I've also made the following modifications: * `DefId` and related structs are now moved to `rustc_span`. This allows us to use a `CrateNum` inside `SourceFile`. `CrateNum` has special handling during deserialization (it gets remapped to be the proper `CrateNum` from the point of view of the current compilation session), so using a `CrateNum` instead of a plain integer 'workaround type' helps to simplify deserialization. * The `ExternalSource` enum is renamed to `ExternalSourceKind`. There is now a struct called `ExternalSource`, which holds an `ExternalSourceKind` along with the original line number information for the file. This is used during `Span` serialization to rebase spans onto their 'owning' crate.
Configuration menu - View commit details
-
Copy full SHA for af55daf - Browse repository at this point
Copy the full SHA af55dafView commit details -
Rollup merge of rust-lang#69036 - eddyb:monoshim, r=nikomatsakis
rustc: don't resolve Instances which would produce malformed shims. There are some `InstanceDef` variants (shims and drop "glue") which contain a `Ty`, and that `Ty` is used in generating the shim MIR. But if that `Ty` mentions any generic parameters, the generated shim would refer to them (but they won't match the `Substs` of the `Instance`), or worse, generating the shim would fail because not enough of the type is known. Ideally we would always produce a "skeleton" of the type, e.g. `(_, _)` for dropping any tuples with two elements, or `Vec<_>` for dropping any `Vec` value, but that's a lot of work, and they would still not match the `Substs` of the `Instance` as it exists today, so `Instance` would probably need to change. By making `Instance::resolve` return `None` in the still-generic cases, we get behavior similar to specialization, where a default can only be used if there are no more generic parameters which would allow a more specialized `impl` to match. <hr/> This was found while testing the MIR inliner with rust-lang#68965, because it was trying to inline shims. cc @rust-lang/wg-mir-opt
Configuration menu - View commit details
-
Copy full SHA for 60f7aa1 - Browse repository at this point
Copy the full SHA 60f7aa1View commit details -
Rollup merge of rust-lang#69189 - matthewjasper:erase-the-world, r=ni…
…komatsakis Erase regions in writeback Regions in `TypeckTables` (except canonicalized user annotations) are now erased. Further, we no longer do lexical region solving on item bodies with `-Zborrowck=mir`. cc rust-lang#68261 r? @nikomatsakis
Configuration menu - View commit details
-
Copy full SHA for 59e1a3d - Browse repository at this point
Copy the full SHA 59e1a3dView commit details -
Rollup merge of rust-lang#69402 - GuillaumeGomez:extend-search, r=kin…
…nison Extend search I realized that when looking for "struct:String" in the rustdoc search for example, the "in arguments" and "returned" tabs were always empty. After some investigation, I realized it was because we only provided the name, and not the type, making it impossible to pass the "type filtering" check. To resolve this, I added the type alongside the name. Note for the future: we could improve this by instead only registering the path id and use the path dictionary directly. The only problem with that solution (which I already tested) is that it becomes complicated for types in other crates. It'd force us to handle both case with an id and a case with `(name, type)`. I found the current PR big enough to not want to provide it directly. However, I think this is definitely worth it to make it work this way in the future. About the two tests I added: they don't have much interest except checking that we actually have something returned in the search in the cases of a type filtering with and without literal search. I also had to update a bit the test script to add the new locally global (haha) variable I created (`NO_TYPE_FILTER`). I added this variable to make the code easier to read than just "-1". r? @kinnison cc @ollie27
Configuration menu - View commit details
-
Copy full SHA for b960a1b - Browse repository at this point
Copy the full SHA b960a1bView commit details -
Rollup merge of rust-lang#69443 - ehuss:tidy-license, r=skade,Mark-Si…
…mulacrum tidy: Better license checks. This implements some improvements to the license checks in tidy: * Use `cargo_metadata` instead of parsing vendored crates. This allows license checks to run without vendoring enabled, and allows the checks to run on PR builds. * Check for stale entries. * Check that the licenses for exceptions are what we think they are. * Verify exceptions do not leak into the runtime. Closes rust-lang#62618 Closes rust-lang#62619 Closes rust-lang#63238 (I think) There are some substantive changes here. The follow licenses have changed from the original comments: * openssl BSD+advertising clause to Apache-2.0 * pest MPL2 to MIT/Apache-2.0 * smallvec MPL2 to MIT/Apache-2.0 * clippy lints MPL2 to MIT OR Apache-2.0
Configuration menu - View commit details
-
Copy full SHA for f4090a6 - Browse repository at this point
Copy the full SHA f4090a6View commit details -
Rollup merge of rust-lang#69497 - Zoxc:ast-fragment-error, r=petroche…
…nkov Don't unwind when hitting the macro expansion recursion limit This removes one use of `FatalError.raise()`. r? @petrochenkov
Configuration menu - View commit details
-
Copy full SHA for e80c8ad - Browse repository at this point
Copy the full SHA e80c8adView commit details -
Rollup merge of rust-lang#69768 - oli-obk:union_field_ice, r=eddyb,Ra…
…lfJung Compute the correct layout for variants of uninhabited enums r? @eddyb cc @RalfJung fixes rust-lang#69191 cc rust-lang#69763
Configuration menu - View commit details
-
Copy full SHA for 45ed7e1 - Browse repository at this point
Copy the full SHA 45ed7e1View commit details -
Rollup merge of rust-lang#69839 - RalfJung:miri-error-cleanup, r=oli-obk
Miri error reform Some time ago we started moving Miri errors into a few distinct categories, but we never classified all the old errors. That's what this PR does. ~~This is on top of rust-lang#69762; [relative diff](RalfJung/rust@validity-errors...RalfJung:miri-error-cleanup).~~ r? @oli-obk Fixes rust-lang/const-eval#4
Configuration menu - View commit details
-
Copy full SHA for c74d524 - Browse repository at this point
Copy the full SHA c74d524View commit details -
Rollup merge of rust-lang#69955 - alexcrichton:stderr-infallible, r=s…
…fackler Fix abort-on-eprintln during process shutdown This commit fixes an issue where if `eprintln!` is used in a TLS destructor it can accidentally cause the process to abort. TLS destructors are executed after `main` returns on the main thread, and at this point we've also deinitialized global `Lazy` values like those which store the `Stderr` and `Stdout` internals. This means that despite handling TLS not being accessible in `eprintln!`, we will fail due to not being able to call `stderr()`. This means that we'll double-panic quickly because panicking also attempt to write to stderr. The fix here is to reimplement the global stderr handle to avoid the need for destruction. This avoids the need for `Lazy` as well as the hidden panic inside of the `stderr` function. Overall this should improve the robustness of printing errors and/or panics in weird situations, since the `stderr` accessor should be infallible in more situations.
Configuration menu - View commit details
-
Copy full SHA for d6f4e39 - Browse repository at this point
Copy the full SHA d6f4e39View commit details -
Rollup merge of rust-lang#69959 - alexcrichton:fix-panic-in-print, r=…
…Mark-Simulacrum std: Don't abort process when printing panics in tests This commit fixes an issue when using `set_print` and friends, notably used by libtest, to avoid aborting the process if printing panics. This previously panicked due to borrowing a mutable `RefCell` twice, and this is worked around by borrowing these cells for less time, instead taking out and removing contents temporarily. Closes rust-lang#69558
Configuration menu - View commit details
-
Copy full SHA for 63e67ce - Browse repository at this point
Copy the full SHA 63e67ceView commit details -
Rollup merge of rust-lang#70051 - Zoxc:opt-find, r=eddyb
Allow `hir().find` to return `None` Fixes rust-lang#70041 r? @eddyb
Configuration menu - View commit details
-
Copy full SHA for c0f826a - Browse repository at this point
Copy the full SHA c0f826aView commit details