summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* ci: disable Azure Pipelines except for macOSremove-most-azurePietro Albini2020-07-224-298/+3
|
* Auto merge of #74578 - ehuss:fix-rust-src, r=Mark-Simulacrumbors2020-07-221-1/+1
|\ | | | | | | | | | | | | | | | | | | Fix rust-src component. The rust-src component could not be installed by rustup because it included some symbolic links. #74520 added the backtrace directory which included some symlinks. Since the rust-src component doesn't need most of the files in the `backtrace` submodule, this changes it to only include the minimum necessary. Tested with cargo's build-std that it can build from the resulting tarball. Fixes #74577
| * Fix rust-src component.Eric Huss2020-07-201-1/+1
| |
* | Auto merge of #74565 - pietroalbini:build-on-gha, r=Mark-Simulacrumbors2020-07-215-31/+78
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Upload builds from GHA instead of Azure Pipelines This PR does two things: * Enables RLA comments on PRs (needed after the switch to GHA in RLA). * Switches GitHub Actions as the CI authorized to upload non-macOS builds. Note that Docker/LLVM caches will likely be busted. r? @Mark-Simulacrum
| * | ci: upload non-macOS from GHA instead of Azure PipelinesPietro Albini2020-07-205-31/+49
| | |
| * | ci: allow RLA to pick the right PR numberPietro Albini2020-07-202-0/+29
| | |
* | | Auto merge of #74075 - sunfishcode:wasi-prelude-rawfd, r=alexcrichtonbors2020-07-211-1/+1
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add `RawFd` to WASI's `std::os::wasi::prelude`. Add `RawFd` to WASI's `std::os::wasi::prelude`, making it consistent with all other platforms which also have `AsRawFd`, `FromRawFd`, and `IntoRawFd` in their respective preludes.
| * | | Add `RawFd` to WASI's `std::os::wasi::prelude`.Dan Gohman2020-07-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add `RawFd` to WASI's `std::os::wasi::prelude`, making it consistent with all other platforms which also have `AsRawFd`, `FromRawFd`, and `IntoRawFd` in their respective preludes.
* | | | Auto merge of #69749 - davidtwco:issue-46477-polymorphization, r=eddybbors2020-07-2167-191/+2034
|\ \ \ \ | |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Polymorphization This PR implements an analysis to detect when functions could remain polymorphic during code generation. Fixes #46477 r? @eddyb cc @rust-lang/wg-mir-opt @nikomatsakis @pnkfelix
| * | | index: introduce and use `FiniteBitSet`David Wood2020-07-2010-73/+211
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a `FiniteBitSet` type which replaces the manual bit manipulation which was being performed in polymorphization. Signed-off-by: David Wood <david@davidtw.co>
| * | | mir: use attribute over `-Z polymorphize-errors`David Wood2020-07-2021-76/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit replaces the `-Z polymorphize-errors` debugging flag with a `#[rustc_polymorphize_error]` attribute for use on functions. Signed-off-by: David Wood <david@davidtw.co>
| * | | metadata: record `unused_generic_params`David Wood2020-07-204-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit records the results of `unused_generic_params` in crate metadata, hopefully improving performance. Signed-off-by: David Wood <david@davidtw.co>
| * | | ty: normalize fn sigs before substDavid Wood2020-07-202-17/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit normalizes function signatures for instances before substituting, a workaround for polymorphization considering parameters unused when they show up in the signature, but not the body (due to being normalized). Unfortunately, this causes test output to change with the parallel compiler only. Signed-off-by: David Wood <david@davidtw.co>
| * | | mir: `unused_generic_params` queryDavid Wood2020-07-2044-84/+1627
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit implements the `unused_generic_params` query, an initial version of polymorphization which detects when an item does not use generic parameters and is being needlessly monomorphized as a result. Signed-off-by: David Wood <david@davidtw.co>
| * | | shim: adjust valid shim assertsDavid Wood2020-07-202-40/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit makes valid shim asserts more specific - checking for the specific types that are valid for a given type of shim - and removes asserts for types which require substitutions. Signed-off-by: David Wood <david@davidtw.co>
| * | | debuginfo: add type metadata for paramsDavid Wood2020-07-202-2/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds type metadata for generic parameters (that arise from polymorphization). Generic parameter metadata is considered zero-sized and named after the generic parameter. Signed-off-by: David Wood <david@davidtw.co>
| * | | debuginfo: no type metadata if substs reqdDavid Wood2020-07-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit skips generating debuginfo type metadata if substitutions are required by the type. This avoids ICEs that result from layouts of types with substitutions being computed. Signed-off-by: David Wood <david@davidtw.co>
| * | | ty: add doc comments to `Generics` methodsDavid Wood2020-07-201-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds doc comments to the `param_at`, `region_param` and `const_param` methods on the `Generics` struct. Signed-off-by: David Wood <david@davidtw.co>
| * | | trait_sel: only test predicates w/ no substsDavid Wood2020-07-205-20/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies the `substitute_normalize_and_test_predicates` query, renaming it to `impossible_predicates` and only checking predicates which do not require substs. By making this change, polymorphization doesn't have to explicitly support vtables. Signed-off-by: David Wood <david@davidtw.co>
| * | | ty: `STILL_FURTHER_SPECIALIZABLE` w/out prnt substDavid Wood2020-07-202-8/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit modifies the `STILL_FURTHER_SPECIALIZABLE` flag so that the flag isn't set by the parent substs of closures or generators. Signed-off-by: David Wood <david@davidtw.co>
| * | | mir: rename `should_monomorphize_locally`David Wood2020-07-201-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit renames `should_monomorphize_locally` to `should_codegen_locally` which better describes what the function determines once polymorphization is added. Signed-off-by: David Wood <david@davidtw.co>
| * | | mir: avoid double substitutionDavid Wood2020-07-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit avoids a natural, free-range double substitution error by monomorphizing the projection element before getting the type. Signed-off-by: David Wood <david@davidtw.co>
* | | | Auto merge of #74569 - Manishearth:rollup-hkn5ex9, r=Manishearthbors2020-07-2028-80/+304
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rollup of 13 pull requests Successful merges: - #72714 (Fix debug assertion in typeck) - #73197 (Impl Default for ranges) - #73323 (wf: check foreign fn decls for well-formedness) - #74051 (disallow non-static lifetimes in const generics) - #74376 (test caching opt_const_param_of on disc) - #74501 (Ayu theme: Use different background color for Run button) - #74505 (Fix search input focus in ayu theme) - #74522 (Update sanitizer docs) - #74546 (Fix duplicate maybe_uninit_extra attribute) - #74552 (Stabilize TAU constant.) - #74555 (Improve "important traits" popup display on mobile) - #74557 (Fix an ICE on an invalid `binding @ ...` in a tuple struct pattern) - #74561 (update backtrace-rs) Failed merges: r? @ghost
| * \ \ \ Rollup merge of #74561 - RalfJung:backtrace, r=alexcrichtonManish Goregaokar2020-07-201-0/+0
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | update backtrace-rs Hopefully fixes https://github.com/rust-lang/rust/issues/74484 r? @alexcrichton
| | * | | | update backtrace-rsRalf Jung2020-07-201-0/+0
| | |/ / /
| * | | | Rollup merge of #74557 - jakubadamw:issue-74539, r=nagisaManish Goregaokar2020-07-203-1/+40
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix an ICE on an invalid `binding @ ...` in a tuple struct pattern Fixes #74539.
| | * | | | Fix an ICE on an invalid `binding @ ...` in a tuple struct patternJakub Adam Wieczorek2020-07-203-1/+40
| | | | | |
| * | | | | Rollup merge of #74555 - GuillaumeGomez:important-traits-popup, r=ManishearthManish Goregaokar2020-07-201-0/+5
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve "important traits" popup display on mobile I implemented what @XAMPPRocky suggested in the [internals thread topic](https://internals.rust-lang.org/t/feedback-on-important-traits-rustdoc-feature/12752/18). I can confirm it works nicely. r? @Manishearth @Manishearth: By the way: I realized that when you click on the "i", you have to click again to make the popup disappear. Do you want me to extend the popup removal to any click outside the popup?
| | * | | | | Improve "important traits" popup display on mobileGuillaume Gomez2020-07-201-0/+5
| | | |/ / / | | |/| | |
| * | | | | Rollup merge of #74552 - fusion-engineering-forks:stabilize-tau, r=dtolnayManish Goregaokar2020-07-202-2/+2
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stabilize TAU constant. Closes #66770.
| | * | | | | Stabilize TAU constant.Mara Bos2020-07-202-2/+2
| | | |/ / / | | |/| | | | | | | | | | | | | | | Closes #66770.
| * | | | | Rollup merge of #74546 - jethrogb:jb/duplicate-attribute-maybe_uninit_extra, ↵Manish Goregaokar2020-07-201-4/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=kennytm Fix duplicate maybe_uninit_extra attribute Introduced in #72414
| | * | | | | Fix duplicate maybe_uninit_extra attributeJethro Beekman2020-07-201-4/+1
| | | |/ / / | | |/| | |
| * | | | | Rollup merge of #74522 - tmiasko:sanitizer-docs, r=nikomatsakisManish Goregaokar2020-07-201-4/+3
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update sanitizer docs * Document AddressSanitizer memory leak detection defaults. * Remove CC & CFLAGS from MemorySanitizer example - they are now unnecessary for pure Rust projects (backtrace-rs moved away from libbacktrace).
| | * | | | | Document AddressSanitizer memory leak detection defaultsTomasz Miąsko2020-07-191-0/+3
| | | | | | |
| | * | | | | Remove CC & CFLAGS from MemorySanitizer exampleTomasz Miąsko2020-07-191-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They are now unnecessary for projects written in Rust, since backtrace-rs used by the standard library has only Rust dependencies.
| * | | | | | Rollup merge of #74505 - Cldfire:fix-search-focus, r=GuillaumeGomezManish Goregaokar2020-07-201-10/+0
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix search input focus in ayu theme Closes #74496. Before: ![image](https://user-images.githubusercontent.com/13814214/87868463-d0c8fe80-c963-11ea-9003-aa578d869e98.png) After: ![image](https://user-images.githubusercontent.com/13814214/87868467-dc1c2a00-c963-11ea-89a8-1280f68ff9df.png)
| | * | | | | | Fix search input focus in ayu themeJarek Samic2020-07-191-10/+0
| | | | | | | |
| * | | | | | | Rollup merge of #74501 - lzutao:css_run_border, r=GuillaumeGomezManish Goregaokar2020-07-201-3/+3
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Ayu theme: Use different background color for Run button Make it clearer that there is a button Run there. Demo in https://github.com/rust-lang/rust/pull/74501#issuecomment-660597377 .
| | * | | | | | | Ayu: use different background color to make Run button easy-to-spotLzu Tao2020-07-191-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Cldfire <cldfire@3grid.net>
| | * | | | | | | Add an border around the Run buttonLzu Tao2020-07-191-0/+1
| | |/ / / / / /
| * | | | | | | Rollup merge of #74376 - lcnr:type-dependent-path-cleanup, r=eddybManish Goregaokar2020-07-201-1/+5
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test caching opt_const_param_of on disc Followup to #74113, implements parts of #74360 Tried caching `opt_const_param_of` on disk and adding an early exit if `tcx.dep_kind(def_id) != DefKind::AnonConst`. Ended up causing a perf regression instead, so we just remove the FIXME and a short note to `opt_const_param_of`. r? @eddyb
| | * | | | | | | add note to `opt_const_param_of`Bastian Kauschke2020-07-181-1/+5
| | | | | | | | |
| * | | | | | | | Rollup merge of #74051 - yodaldevoid:issue_60814, r=nikomatsakisManish Goregaokar2020-07-208-0/+109
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disallow non-static lifetimes in const generics Disallow non-static lifetimes in const generics in order to to patch over an ICE caused when we encounter a non-static lifetime in a const generic during borrow checking. This restriction may be relaxed in the future, but we need more discussion before then, and in the meantime we should still deal with this ICE. Fixes issue #60814
| | * | | | | | | | Add test for an explicit non-'static lifetime in a const argumentGabriel Smith2020-07-192-0/+28
| | | | | | | | | |
| | * | | | | | | | disallow non-static lifetimes in const genericsGabriel Smith2020-07-196-0/+81
| | | |_|/ / / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This has been put in place to patch over an ICE caused when we encounter a non-static lifetime in a const generic during borrow checking. This restriction may be relaxed in the future, but we need more discussion before then, and in the meantime we should still deal with this ICE. Fixes issue #60814
| * | | | | | | | Rollup merge of #73323 - davidtwco:issue-73252-wfcheck-foreign-fn-decl, ↵Manish Goregaokar2020-07-205-52/+97
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r=ecstatic-morse wf: check foreign fn decls for well-formedness Fixes #73252 and fixes #73253. This PR extends current well-formedness checking to apply to foreign function declarations, re-using the existing machinery for regular functions. In doing this, later parts of the compiler (such as the `improper_ctypes` lint) can rely on being operations not failing as a result of invalid code which would normally be caught earlier.
| | * | | | | | | | wf: check foreign fn decls for well-formednessDavid Wood2020-07-205-52/+97
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit extends current well-formedness checking to apply to foreign function declarations, re-using the existing machinery for regular functions. In doing this, later parts of the compiler (such as the `improper_ctypes` lint) can rely on being operations not failing as a result of invalid code which would normally be caught earlier. Signed-off-by: David Wood <david@davidtw.co>
| * | | | | | | | | Rollup merge of #73197 - c410-f3r:ranges, r=dtolnayManish Goregaokar2020-07-201-2/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Impl Default for ranges Couldn't find an issue about it. `Range` and friends probably can implement `Default` if `Idx: Default`. For example, the following would be possible: ```rust #[derive(Default)] struct Foo(core::ops::RangeToInclusive<u64>); let _ = [1, 2, 3].get(core::ops::Range::default()); core::ops::RangeFrom::<u8>::default().take(20).for_each(|x| { dbg!(x); }); fn stuff<T: Default>() { let instance = T::default(); ... more stuff } stuff::<core::ops::RangeTo<f32>>(); ``` Maybe there are some concerns about safety or misunderstandings?
| | * | | | | | | | | Remove some Default implsCaio2020-07-101-4/+4
| | | | | | | | | | |