about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-10-13Deduplicate regions ids before merging themTomasz Miąsko-0/+19
The merging code does not expect to see any duplicates.
2021-10-12Auto merge of #89770 - jkugelman:must-use-from-and-into, r=joshtriplettbors-151/+152
Add #[must_use] to From::from and Into::into Risk of churn: **High** Magic 8-Ball says: **Outlook not so good** I figured I'd put this out there. If we don't do it now maybe we save it for a rainy day. Parent issue: #89692 r? `@joshtriplett`
2021-10-12Auto merge of #89791 - matthiaskrgr:rollup-1lhxh5b, r=matthiaskrgrbors-32/+56
Rollup of 9 pull requests Successful merges: - #89471 (Use Ancestory to check default fn in const impl instead of comparing idents) - #89643 (Fix inherent impl overlap check.) - #89651 (Add `Poll::ready` and revert stabilization of `task::ready!`) - #89675 (Re-use TypeChecker instead of passing around some of its fields ) - #89710 (Add long explanation for error E0482) - #89756 (Greatly reduce amount of debuginfo compiled for bootstrap itself) - #89760 (Remove hack ignoring unused attributes for stage 0 std) - #89772 (Fix function-names test for GDB 10.1) - #89785 (Fix ICE when compiling nightly std/rustc on beta compiler) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-11Add #[must_use] to From::from and Into::intoJohn Kugelman-151/+152
2021-10-11Rollup merge of #89772 - michaelwoerister:fix-function-names-test-gdb, ↵Matthias Krüger-15/+16
r=Mark-Simulacrum Fix function-names test for GDB 10.1 This PR updates the test output in `src/test/debuginfo/function-names.rs` for GDB 10.1. This should fix issue https://github.com/rust-lang/rust/issues/89750 -- but not the underlying problem of CI ignoring tests if not viable debugger happens to be present.
2021-10-11Rollup merge of #89760 - jyn514:remove-incremental-hack, r=Mark-SimulacrumMatthias Krüger-6/+0
Remove hack ignoring unused attributes for stage 0 std This seems to no longer be giving spurious errors when incremental is enabled. Closes https://github.com/rust-lang/rust/issues/58633.
2021-10-11Rollup merge of #89756 - jyn514:bootstrap-times, r=Mark-SimulacrumMatthias Krüger-2/+1
Greatly reduce amount of debuginfo compiled for bootstrap itself Rather than compiling rustbuild and all its dependencies with `debuginfo=2`, this compiles dependencies without debuginfo and rustbuild with `debuginfo=1`. On my laptop, this brings compile times down from ~1:20 to ~1:05. See also https://rust-lang.zulipchat.com/#narrow/stream/242791-t-infra/topic/async.20in.20bootstrap.3F/near/254847594. r? ``@Mark-Simulacrum``
2021-10-11Rollup merge of #89710 - sireliah:e0482, r=GuillaumeGomezMatthias Krüger-1/+1
Add long explanation for error E0482 This is longer explanation for error E0482 in the #61137. Please take a look and leave some feedback!
2021-10-11Rollup merge of #89471 - nbdd0121:const3, r=fee1-deadMatthias Krüger-8/+38
Use Ancestory to check default fn in const impl instead of comparing idents Fixes https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Const.20trait.20impl.20inside.20macro
2021-10-11Auto merge of #89648 - nbdd0121:issue-89606, r=nikomatsakisbors-0/+40
Ignore type of projections for upvar capturing Fix #89606 Ignore type of projections for upvar capturing. Originally HashMap is used, and the hash/eq implementation of Place takes the type of projections into account. These types may differ by lifetime which causes #89606 to ICE. I originally considered erasing regions but `place.ty()` is used when creating upvar tuple type, more than just serving as a key type, so I switched to a linear comparison with custom eq (`compare_place_ignore_ty`) instead. r? `@wesleywiser` `@rustbot` label +T-compiler
2021-10-11Split impl-with-default-fn test into a pass test and a fail testGary Guo-8/+38
2021-10-11Auto merge of #83908 - Flying-Toast:master, r=davidtwcobors-315/+181
Add enum_intrinsics_non_enums lint There is a clippy lint to prevent calling [`mem::discriminant`](https://doc.rust-lang.org/std/mem/fn.discriminant.html) with a non-enum type. I think the lint is worthy of being included in rustc, given that `discriminant::<T>()` where `T` is a non-enum has an unspecified return value, and there are no valid use cases where you'd actually want this. I've also made the lint check [variant_count](https://doc.rust-lang.org/core/mem/fn.variant_count.html) (#73662). closes #83899
2021-10-11Fix function-names test for GDB 10.1Michael Woerister-15/+16
2021-10-11Rollup merge of #89761 - lnicola:rust-analyzer-2021-10-11, r=lnicolaGuillaume Gomez-18/+17
:arrow_up: rust-analyzer r? ``@ghost``
2021-10-11Rollup merge of #89754 - dns2utf8:rustdoc_cleanup_css, r=GuillaumeGomezGuillaume Gomez-1/+1
Cleanup .item-table CSS The main table-like element must be `display: table;` r? `@GuillaumeGomez`
2021-10-11Rollup merge of #89726 - jkugelman:must-use-alloc-constructors, r=joshtriplettGuillaume Gomez-2/+2
Add #[must_use] to alloc constructors Added `#[must_use]`. to the various forms of `new`, `pin`, and `with_capacity` in the `alloc` crate. No extra explanations given as I couldn't think of anything useful to add. I figure this deserves extra scrutiny compared to the other PRs I've done so far. In particular: * The 4 `pin`/`pin_in` methods I touched. Are there legitimate use cases for pinning and not using the result? Pinning's a difficult concept I'm not very comfortable with. * `Box`'s constructors. Do people ever create boxes just for the side effects... allocating or zeroing out memory? Parent issue: #89692 r? ``@joshtriplett``
2021-10-11Rollup merge of #89655 - tlyu:find-non-merge-commits, r=jyn514Guillaume Gomez-3/+15
bootstrap: don't use `--merges` to look for commit hashes for downloading artifacts Shallow clones (and possibly worktrees, though I can't seem to reproduce the problem there) can cause `git rev-list --merges` to falsely return no results, even if a merge commit is present. Stop using the `--merges` option when looking for commit hashes that have build artifacts. `--first-parent` and `--author=bors@rust-lang.org` should be sufficient. Also exit with an error if the configuration asks for artifacts to be downloaded and we can't determine an appropriate commit hash to use to download artifacts. Fixes #87890. r? ``@jyn514`` ``@rustbot`` label +A-rustbuild +A-contributor-roadblock
2021-10-11Cleanup .item-table CSSStefan Schindler-1/+1
2021-10-11Deprecate mem_discriminant_non_enumflip1995-314/+15
This lint has been uplifted and is now included in enum_intrinsics_non_enums.
2021-10-11Add enum_intrinsics_non_enums lintFlying-Toast-1/+166
2021-10-11:arrow_up: rust-analyzerLaurențiu Nicola-18/+17
2021-10-11Remove hack ignoring unused attributes for stage 0 stdJoshua Nelson-6/+0
This seems to no longer be giving spurious errors when incremental is enabled.
2021-10-11Auto merge of #89597 - michaelwoerister:improve-vtable-debuginfo, r=wesleywiserbors-21/+47
Create more accurate debuginfo for vtables. Before this PR all vtables would have the same name (`"vtable"`) in debuginfo. Now they get an unambiguous name that identifies the implementing type and the trait that is being implemented. This is only one of several possible improvements: - This PR describes vtables as arrays of `*const u8` pointers. It would nice to describe them as structs where function pointer is represented by a field with a name indicative of the method it maps to. However, this requires coming up with a naming scheme that avoids clashes between methods with the same name (which is possible if the vtable contains multiple traits). - The PR does not update the debuginfo we generate for the vtable-pointer field in a fat `dyn` pointer. Right now there does not seem to be an easy way of getting ahold of a vtable-layout without also knowing the concrete self-type of a trait object. r? `@wesleywiser`
2021-10-10Greatly reduce amount of debuginfo compiled for bootstrap itselfJoshua Nelson-2/+1
Rather than compiling rustbuild and all its dependencies with `debuginfo=2`, this compiles dependencies without debuginfo and rustbuild with `debuginfo=1`. On my laptop, this brings compile times down from ~1:20 to ~1:05.
2021-10-11Auto merge of #89752 - matthiaskrgr:rollup-v4fgmwg, r=matthiaskrgrbors-128/+183
Rollup of 6 pull requests Successful merges: - #89579 (Add regression test for issue 80108) - #89632 (Fix docblock code display on mobile) - #89691 (Move `DebuggerCommands` and `check_debugger_output` to a separate module) - #89707 (Apply clippy suggestions for std) - #89722 (Fix spelling: Cannonical -> Canonical) - #89736 (Remove unused CSS rule) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-11Rollup merge of #89736 - GuillaumeGomez:rm-unused-css-rule, r=dns2utf8Matthias Krüger-2/+0
Remove unused CSS rule As you can see in the firefox devtools: ![Screenshot from 2021-10-10 14-28-08](https://user-images.githubusercontent.com/3050060/136695689-16c77ceb-b1ab-40df-963a-048f2258e217.png) It needs the display to be `grid` or `inline-grid`, which isn't the case. r? `@dns2utf8`
2021-10-11Rollup merge of #89722 - jkugelman:cannonical-typo, r=joshtriplettMatthias Krüger-1/+1
Fix spelling: Cannonical -> Canonical
2021-10-11Rollup merge of #89691 - Nicholas-Baron:debugger_commands, r=Mark-SimulacrumMatthias Krüger-125/+151
Move `DebuggerCommands` and `check_debugger_output` to a separate module Work towards #89475. As part of this move, the public functions were changed to return `Result`. This is so that the error handling that initially took `&self: TestCx` can still use that `TestCx`.
2021-10-11Rollup merge of #89632 - GuillaumeGomez:fix-docblock-code, r=jshaMatthias Krüger-0/+16
Fix docblock code display on mobile Fixes https://github.com/rust-lang/rust/issues/89618. Before: ![Screenshot from 2021-10-07 12-01-37](https://user-images.githubusercontent.com/3050060/136363624-72bedddd-b45e-48a0-89b4-6563612f8677.png) After: ![Screenshot from 2021-10-07 20-17-21](https://user-images.githubusercontent.com/3050060/136440704-fa9ffa68-8e94-46a7-b556-c41aa5153750.png) r? `@jsha`
2021-10-11Rollup merge of #89579 - workingjubilee:regression-test-80108, r=Mark-SimulacrumMatthias Krüger-0/+15
Add regression test for issue 80108 Closes #80108
2021-10-10Auto merge of #89541 - workingjubilee:abbrev-shufvec-t, r=Mark-Simulacrumbors-358/+205
Cleanup src/test/ui/{simd,simd-intrinsic} Initial motivation was to simplify a huge macro expansion using a tuple, since we can just use an array in `#[repr(simd)]` now for the same result. But also, several tests were going unnoticed during development of SIMD intrinsics because people kept looking in the wrong directory, and many are basically run-pass vs. build-fail versions of the same tests, so let's keep them close together and simplify their names, so they're easier to sift through.
2021-10-10Add regression test for issue 80108Jubilee Young-0/+15
2021-10-10Auto merge of #89739 - matthiaskrgr:rollup-kskwqy5, r=matthiaskrgrbors-25/+148
Rollup of 11 pull requests Successful merges: - #88374 (Fix documentation in Cell) - #88713 (Improve docs for int_log) - #89428 (Feature gate the non_exhaustive_omitted_patterns lint) - #89438 (docs: `std::hash::Hash` should ensure prefix-free data) - #89520 (Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui) - #89705 (Cfg hide no_global_oom_handling and no_fp_fmt_parse) - #89713 (Fix ABNF of inline asm options) - #89718 (Add #[must_use] to is_condition tests) - #89719 (Add #[must_use] to char escape methods) - #89720 (Add #[must_use] to math and bit manipulation methods) - #89735 (Stabilize proc_macro::is_available) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-10-10Rollup merge of #89735 - bjorn3:stabilize_proc_macro_is_available, ↵Matthias Krüger-3/+0
r=petrochenkov Stabilize proc_macro::is_available Tracking issue: https://github.com/rust-lang/rust/issues/71436 The FCP for the stabilization of `proc_macro::is_available` has completed.
2021-10-10Rollup merge of #89713 - nbdd0121:doc2, r=AmanieuMatthias Krüger-1/+1
Fix ABNF of inline asm options This is the case since #73227. r? `@camelid`
2021-10-10Rollup merge of #89520 - GuillaumeGomez:cache-rustdoc-gui-test, ↵Matthias Krüger-1/+1
r=Mark-Simulacrum Don't rebuild GUI test crates every time you run test src/test/rustdoc-gui This method has multiple advantages: * It'll completely remove the rustdoc-GUI test doc folder if rustdoc was updated * It'll rebuild GUI test crates only they have been updated All in all, it's quite convenient! (even more with https://github.com/rust-lang/rust/pull/88816) r? ```@Mark-Simulacrum```
2021-10-10Rollup merge of #89428 - DevinR528:reachable-featuregate, r=Nadrieril,camelidMatthias Krüger-20/+146
Feature gate the non_exhaustive_omitted_patterns lint Fixes https://github.com/rust-lang/rust/issues/89374 Add the machinery to gate the new `non_exhaustive_omitted_patterns` lint. relates to https://github.com/rust-lang/rust/pull/89105 and https://github.com/rust-lang/rust/pull/89423
2021-10-10Auto merge of #89633 - rhysd:issue-65230, r=petrochenkovbors-18/+47
Show detailed expected/found types in error message when trait paths are the same Fixes #65230. ### Issue solved by this PR ```rust trait T { type U; fn f(&self) -> Self::U; } struct X<'a>(&'a mut i32); impl<'a> T for X<'a> { type U = &'a i32; fn f(&self) -> Self::U { self.0 } } fn main() {} ``` Compiler generates the following note: ``` note: ...so that the types are compatible --> test.rs:10:28 | 10 | fn f(&self) -> Self::U { | ____________________________^ 11 | | self.0 12 | | } | |_____^ = note: expected `T` found `T` ``` This note is not useful since the expected type and the found type are the same. ### How this PR solve the issue When the expected type and the found type are exactly the same in string representation, the note falls back to the detailed string representation of trait ref: ``` note: ...so that the types are compatible --> test.rs:10:28 | 10 | fn f(&self) -> Self::U { | ____________________________^ 11 | | self.0 12 | | } | |_____^ = note: expected `<X<'a> as T>` found `<X<'_> as T>` ``` So that a user can notice what was different between the expected one and the found one.
2021-10-10Merge branch 'rust-lang:master' into must-use-alloc-constructorsJohn Kugelman-55/+180
2021-10-10Remove unused CSS ruleGuillaume Gomez-2/+0
2021-10-10Add test for <code> in doc blocks on mobileGuillaume Gomez-0/+12
2021-10-10Stabilize proc_macro::is_availablebjorn3-3/+0
2021-10-10Fix <code> blocks in doc blocks display on mobileGuillaume Gomez-0/+4
2021-10-10Auto merge of #88952 - skrap:add-armv7-uclibc, r=nagisabors-0/+67
Add new tier-3 target: armv7-unknown-linux-uclibceabihf This change adds a new tier-3 target: armv7-unknown-linux-uclibceabihf This target is primarily used in embedded linux devices where system resources are slim and glibc is deemed too heavyweight. Cross compilation C toolchains are available [here](https://toolchains.bootlin.com/) or via [buildroot](https://buildroot.org). The change is based largely on a previous PR #79380 with a few minor modifications. The author of that PR was unable to push the PR forward, and graciously allowed me to take it over. Per the [target tier 3 policy](https://github.com/rust-lang/rfcs/blob/master/text/2803-target-tier-policy.md), I volunteer to be the "target maintainer". This is my first PR to Rust itself, so I apologize if I've missed things!
2021-10-10Add #[must_use] to alloc constructorsJohn Kugelman-2/+2
2021-10-10Fix spelling: Cannonical -> CanonicalJohn Kugelman-1/+1
2021-10-10Auto merge of #89695 - jsha:more-templates, r=GuillaumeGomezbors-55/+113
Move top part of print_item to Tera templates Part of #84419. This moves the first line of each item page (E.g. `Struct foo::Bar .... 1.0.0 [-][src]` into a Tera template. I also moved template initialization into its own module and added a small macro to reduce duplication and opportunity for errors.
2021-10-10Auto merge of #89661 - rusticstuff:libisl_mirror_take_two, r=Mark-Simulacrumbors-4/+8
CI: Use mirror for libisl downloads for more docker dist builds http://isl.gforge.inria.fr fell from the net a couple of days ago. It hosts libisl source tarballs required by crosstool-ng, which we use for our docker dist cross-compilation builds. Some of the affected builds were already fixed in #89599. This PR sets a mirror URL for the other builds requiring libisl-0.14. They use an older version of crosstool-ng (1.22.0), which has only one mirror setting for all downloads. r? `@Mark-Simulacrum`
2021-10-09Auto merge of #89631 - camsteffen:clippy-boot-env, r=Mark-Simulacrumbors-8/+1
Remove unused clippy bootstrap env vars Continues rust-lang/rust-clippy#7646
2021-10-09Fix ABNF of inline asm optionsGary Guo-1/+1