about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-02-02Rollup merge of #80629 - sexxi-goose:migrations_1, r=nikomatsakisJonas Schievink-6/+565
Add lint for 2229 migrations Implements the first for RFC 2229 where we make the decision to migrate a root variable based on if the type of the variable needs Drop and if the root variable would be moved into the closure when the feature isn't enabled. r? `@nikomatsakis`
2021-02-02Auto merge of #81539 - nikic:update-armhf-gnu, r=sanxiynbors-23/+29
Update armhf-gnu to Ubuntu 20.04 This requires updating the used Linux kernel to avoid an assembler error, the used busybox version to avoid a linker error, the used rootfs to match the host version and the qemu flags to work with the newer version. r? `@Mark-Simulacrum`
2021-02-01New migrationAman Arora-28/+28
2021-02-02Auto merge of #81651 - ehuss:update-cargo, r=ehussbors-0/+0
Update cargo 5 commits in c3abcfe8a75901c7c701557a728941e8fb19399e..e099df243bb2495b9b197f79c19f124032b1e778 2021-01-25 16:16:43 +0000 to 2021-02-01 16:24:34 +0000 - Impl warn for locked install without Cargo.lock (rust-lang/cargo#9108) - Document -Z extra-link-arg. (rust-lang/cargo#9121) - Flip 'foo' and 'bar' to be consistent (rust-lang/cargo#9120) - Don't try to parse MSRV if feature is not enabled (rust-lang/cargo#9115) - simplify char range check (rust-lang/cargo#9110)
2021-02-01PR fixupAman Arora-2/+2
2021-02-01Tests for 2229 lintAman Arora-0/+559
2021-02-01Update cargoEric Huss-0/+0
2021-02-02Auto merge of #81557 - GuillaumeGomez:primitive-search, r=ollie27bors-14/+61
Fix primitive search in parameters and returned values Part of #60485. Fixes #74780. Replacing #74879. cc `@camelid` `@jyn514` `@CraftSpider` r? `@ollie27`
2021-02-01Process mentioned upvars for analysis first pass after ExprUseVisitorAman Arora-6/+6
- This allows us add fake information after handling migrations if needed. - Capture analysis also priortizes what we see earlier, which means fake information should go in last.
2021-02-01Auto merge of #80641 - Danue1:patch-1, r=oli-obkbors-11/+57
Add visitors for checking #[inline] For #80564
2021-02-01Auto merge of #81625 - jonas-schievink:rollup-mshpp2n, r=jonas-schievinkbors-18/+222
Rollup of 12 pull requests Successful merges: - #78641 (Let io::copy reuse BufWriter buffers) - #79291 (Add error message for private fn) - #81364 (Improve `rustc_mir_build::matches` docs) - #81387 (Move some tests to more reasonable directories - 3) - #81463 (Rename NLL* to Nll* accordingly to C-CASE) - #81504 (Suggest accessing field when appropriate) - #81529 (Fix invalid camel case suggestion involving unicode idents) - #81536 (Indicate both start and end of pass RSS in time-passes output) - #81592 (Rustdoc UI fixes) - #81594 (Avoid building LLVM just for llvm-dwp) - #81598 (Fix calling convention for CRT startup) - #81618 (Sync rustc_codegen_cranelift) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-02-02Bless testsDanuel-3/+3
2021-02-01Improve diff display in case the whole key in missingGuillaume Gomez-0/+4
2021-02-01Add test for primitive searchGuillaume Gomez-0/+30
2021-02-01Put back primitives in searchGuillaume Gomez-14/+27
2021-02-01Fixed #[inline] to be warned in fields, arms, macro defsDanuel-8/+54
Add visitors for checking #[inline] Add visitors for checking #[inline] with struct field Fix test for #[inline] Add visitors for checking #[inline] with #[macro_export] macro Add visitors for checking #[inline] without #[macro_export] macro Add use alias with Visitor Fix lint error Reduce unnecessary variable Co-authored-by: LingMan <LingMan@users.noreply.github.com> Change error to warning Add warning for checking field, arm with #[allow_internal_unstable] Add name resolver Formatting Formatting Fix error fixture Add checking field, arm, macro def
2021-02-01Rollup merge of #81594 - bjorn3:avoid_building_llvm_for_dwp, r=sanxiynJonas Schievink-2/+4
Avoid building LLVM just for llvm-dwp When the LLVM backend is disabled, the llvm-project submodule is not checked out by default. This breaks the bootstrap test for cg_clif. As cg_clif doesn't support split debuginfo anyway llvm-dwp is not necessary. Other backends would likely not want to build LLVM just for llvm-dwp either. Fixes https://github.com/bjorn3/rustc_codegen_cranelift/issues/1119
2021-02-01Rollup merge of #81592 - GuillaumeGomez:rustdoc-ui-fixes, r=Nemo157Jonas Schievink-11/+2
Rustdoc UI fixes The first commit fixes this bug (I couldn't figure out why we were setting the width manually and it works as expected without so...): ![Screenshot from 2021-01-31 12-58-46](https://user-images.githubusercontent.com/3050060/106384371-d56a7700-63ca-11eb-9e04-c06b40c2ab5e.png) The second commit fixes a small bug. On tablets or computer with very little width, the search section goes "over" the search input, making it impossible to click on the search input: ![Screenshot from 2021-01-31 13-22-37](https://user-images.githubusercontent.com/3050060/106384413-021e8e80-63cb-11eb-8321-391a1f8a4c7e.png) The third and last commit fixes two bugs that you can see in this screenshot: ![Screenshot from 2021-01-31 13-41-05](https://user-images.githubusercontent.com/3050060/106384424-0cd92380-63cb-11eb-82de-76218286c3fb.png) The wheel is going over the search input and the search tab is going under the search results text. The bug was fixed by simply switching to "mobile mode" at a bigger width: ![Screenshot from 2021-01-31 13-49-50](https://user-images.githubusercontent.com/3050060/106384466-4447d000-63cb-11eb-9330-a7cd29403905.png) cc ```@pickfire``` r? ```@Nemo157```
2021-02-01Rollup merge of #81529 - estebank:case_lints, r=davidtwcoJonas Schievink-4/+4
Fix invalid camel case suggestion involving unicode idents Follow up to #77805.
2021-02-01Rollup merge of #81504 - matsujika:suggestion-field-access, r=estebankJonas Schievink-0/+137
Suggest accessing field when appropriate Fix #81222 r? ``@estebank``
2021-02-01Rollup merge of #81387 - c410-f3r:tests-tests-tests, r=petrochenkovJonas Schievink-1/+1
Move some tests to more reasonable directories - 3 cc #73494 r? ````@petrochenkov```` https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56202.rs <sup>https://github.com/rust-lang/rust/issues/56202</sup>: traits 1.008 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-69841.rs <sup>https://github.com/rust-lang/rust/issues/69841</sup>: for-loop-while 1.014 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10763.rs <sup>https://github.com/rust-lang/rust/issues/10763</sup>: extern 1.016 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-50599.rs <sup>https://github.com/rust-lang/rust/issues/50599</sup>: resolve 1.018 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-6128.rs <sup>https://github.com/rust-lang/rust/issues/6128</sup>: traits 1.043 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-20616-8.rs <sup>https://github.com/rust-lang/rust/issues/20616</sup>: parser 1.045 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-46553.rs <sup>https://github.com/rust-lang/rust/issues/46553</sup>: consts 1.081 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33140-hack-boundaries.rs <sup>https://github.com/rust-lang/rust/issues/33140</sup>: traits 1.101 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-25826.rs <sup>https://github.com/rust-lang/rust/issues/25826</sup>: consts 1.108 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56488.rs <sup>https://github.com/rust-lang/rust/issues/56488</sup>: traits 1.110 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-58856-1.rs <sup>https://github.com/rust-lang/rust/issues/58856</sup>: parser 1.133 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57819.rs <sup>https://github.com/rust-lang/rust/issues/57819</sup>: parser 1.138 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-54348.rs <sup>https://github.com/rust-lang/rust/issues/54348</sup>: consts 1.155 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-14309.rs <sup>https://github.com/rust-lang/rust/issues/14309</sup>: lint 1.160 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-4446.rs <sup>https://github.com/rust-lang/rust/issues/4446</sup>: threads-sendsync 1.203 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-53675-a-test-called-panic.rs <sup>https://github.com/rust-lang/rust/issues/53675</sup>: test-attrs 1.211 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-40231-2.rs <sup>https://github.com/rust-lang/rust/issues/40231</sup>: consts 1.213 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-22037.rs <sup>https://github.com/rust-lang/rust/issues/22037</sup>: associated-types 1.214 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-59029-2.rs <sup>https://github.com/rust-lang/rust/issues/59029</sup>: traits 1.219 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18425.rs <sup>https://github.com/rust-lang/rust/issues/18425</sup>: consts 1.237 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-6157.rs <sup>https://github.com/rust-lang/rust/issues/6157</sup>: regions 1.238 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33819.rs <sup>https://github.com/rust-lang/rust/issues/33819</sup>: borrowck 1.280 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-3683.rs <sup>https://github.com/rust-lang/rust/issues/3683</sup>: traits 1.283 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-8709.rs <sup>https://github.com/rust-lang/rust/issues/8709</sup>: macros 1.291 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-20616-9.rs <sup>https://github.com/rust-lang/rust/issues/20616</sup>: parser 1.293 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-64732.rs <sup>https://github.com/rust-lang/rust/issues/64732</sup>: parser 1.296 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-18655.rs <sup>https://github.com/rust-lang/rust/issues/18655</sup>: associated-types 1.305 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-32947.rs <sup>https://github.com/rust-lang/rust/issues/32947</sup>: simd 1.322 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57198.rs <sup>https://github.com/rust-lang/rust/issues/57198</sup>: parser 1.342 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-10764-rpass.rs <sup>https://github.com/rust-lang/rust/issues/10764</sup>: extern 1.392 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-73541-2.rs <sup>https://github.com/rust-lang/rust/issues/73541</sup>: async-await 1.422 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-7970b.rs <sup>https://github.com/rust-lang/rust/issues/7970</sup>: parser 1.439 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-57684.rs <sup>https://github.com/rust-lang/rust/issues/57684</sup>: parser 1.512 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-33264.rs <sup>https://github.com/rust-lang/rust/issues/33264</sup>: llvm-asm 1.523 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-65284-suggest-generic-trait-bound.rs <sup>https://github.com/rust-lang/rust/issues/65284</sup>: suggestions 1.647 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-17458.rs <sup>https://github.com/rust-lang/rust/issues/17458</sup>: consts 1.711 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-56762.rs <sup>https://github.com/rust-lang/rust/issues/56762</sup>: consts 1.787 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-2216.rs <sup>https://github.com/rust-lang/rust/issues/2216</sup>: for-loop-while 1.856 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-45696-scribble-on-boxed-borrow.rs <sup>https://github.com/rust-lang/rust/issues/45696</sup>: nll 2.009 https://github.com/rust-lang/rust/blob/master/src/test/ui/issues/issue-46036.rs <sup>https://github.com/rust-lang/rust/issues/46036</sup>: nll 2.059 ````@petrochenkov```` Can you put a place holder (like `N/A`) for tests without GitHub issues? It is a lot easier to parse fixed sized rows.
2021-02-01Rollup merge of #79291 - JulianKnodt:ce_priv, r=petrochenkovJonas Schievink-0/+74
Add error message for private fn Attempts to add a more detailed error when a `const_evaluatable` fn from another scope is used inside of a scope which cannot access it. r? ````@lcnr````
2021-02-01:arrow_up: rust-analyzerJonas Schievink-32/+15
2021-02-01Auto merge of #80851 - m-ou-se:panic-2021, r=petrochenkovbors-415/+432
Implement Rust 2021 panic This implements the Rust 2021 versions of `panic!()`. See https://github.com/rust-lang/rust/issues/80162 and https://github.com/rust-lang/rfcs/pull/3007. It does so by replacing `{std, core}::panic!()` by a bulitin macro that expands to either `$crate::panic::panic_2015!(..)` or `$crate::panic::panic_2021!(..)` depending on the edition of the caller. This does not yet make std's panic an alias for core's panic on Rust 2021 as the RFC proposes. That will be a separate change: https://github.com/rust-lang/rust/pull/80879/commits/c5273bdfb266c35e8eab9413aa8d58d27fdbe114 That change is blocked on figuring out what to do with https://github.com/rust-lang/rust/issues/80846 first.
2021-02-01Auto merge of #81591 - RalfJung:miri, r=RalfJungbors-7/+9
update Miri Fixes https://github.com/rust-lang/rust/issues/81551 Cc `@rust-lang/miri` r? `@ghost`
2021-01-31Move some tests to more reasonable directoriesCaio-1/+1
2021-01-31Add error message for private fnkadmin-0/+74
Bless tests Update with changes from comments
2021-01-31Rollup merge of #81566 - osa1:issue71202, r=jonas-schievinkJonas Schievink-0/+33
Add a test for #71202 Closes #71202 --- Note that the test normally generates this warning: ``` warning: cannot use constants which depend on generic parameters in types --> test.rs:10:5 | 10 | / const ITEM_IS_COPY: [(); 1 - { 11 | | trait NotCopy { 12 | | const VALUE: bool = false; 13 | | } ... | 26 | | <IsCopy<T>>::VALUE 27 | | } as usize] = []; | |_____________________^ | = note: `#[warn(const_evaluatable_unchecked)]` on by default = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #76200 <https://github.com/rust-lang/rust/issues/76200> ``` I added `allow(const_evaluatable_unchecked)`, but maybe we just don't want to add a test for this as the program is not really valid?
2021-01-31Rollup merge of #81480 - b-naber:nested_fields_suggestion, r=estebankJonas Schievink-0/+165
Add suggestion for nested fields Closes https://github.com/rust-lang/rust/issues/81220 r? ```@estebank```
2021-01-31Rollup merge of #80404 - JulianKnodt:arr_ref, r=oli-obkJonas Schievink-95/+52
Remove const_in_array_repeat Fixes #80371. Fixes #81315. Fixes #80767. Fixes #75682. I thought there might be some issue with `Repeats(_, 0)`, but if you increase the items in the array it still ICEs. I'm not sure if this is the best fix but it does fix the given issue.
2021-01-31Rollup merge of #80092 - sexxi-goose:restrict_precision, r=nikomatsakisJonas Schievink-0/+964
2229: Fix issues with move closures and mutability This PR fixes two issues when feature `capture_disjoint_fields` is used. 1. Can't mutate using a mutable reference 2. Move closures try to move value out through a reference. To do so, we 1. Compute the mutability of the capture and store it as part of the `CapturedPlace` that is written in TypeckResults 2. Restrict capture precision. Note this is temporary for now, to allow the feature to be used with move closures and ByValue captures and might change depending on discussions with the lang team. - No Derefs are captured for ByValue captures, since that will result in value behind a reference getting moved. - No projections are applied to raw pointers since these require unsafe blocks. We capture them completely. r? `````@nikomatsakis`````
2021-01-31Bless coverage-spanview/expected_mir_dump.*.Mara Bos-75/+75
2021-01-31Avoid building LLVM just for llvm-dwpbjorn3-2/+4
When the LLVM backend is disabled, the llvm-project submodule is not checked out by default. This breaks the bootstrap test for cg_clif. As cg_clif doesn't support split debuginfo anyway llvm-dwp is not necessary. Other backends would likely not want to build LLVM just for llvm-dwp either.
2021-01-31update MiriRalf Jung-7/+9
2021-01-31Improve resize handlingGuillaume Gomez-1/+1
2021-01-31Prevent search section to go over search inputGuillaume Gomez-1/+1
2021-01-31Remove unneeded explicit width from search resultsGuillaume Gomez-9/+0
2021-01-31Auto merge of #81578 - jonas-schievink:rollup-yhiyowl, r=jonas-schievinkbors-22/+96
Rollup of 18 pull requests Successful merges: - #78044 (Implement io::Seek for io::Empty) - #79285 (Stabilize Arc::{increment,decrement}_strong_count) - #80053 (stabilise `cargo test -- --include-ignored`) - #80279 (Implement missing `AsMut<str>` for `str`) - #80470 (Stabilize by-value `[T; N]` iterator `core::array::IntoIter`) - #80945 (Add Box::downcast() for dyn Any + Send + Sync) - #81048 (Stabilize `core::slice::fill_with`) - #81198 (Remove requirement that forces symmetric and transitive PartialEq impls to exist) - #81422 (Account for existing `_` field pattern when suggesting `..`) - #81472 (Clone entire `TokenCursor` when collecting tokens) - #81484 (Optimize decimal formatting of 128-bit integers) - #81491 (Balance sidebar `Deref` cycle check with main content) - #81509 (Add a regression test for ICE of bad_placeholder_type) - #81547 (Edit rustc_typeck top-level docs) - #81550 (Replace predecessor with range in collections documentation) - #81558 (Fix ascii art text wrapping in mobile) - #81562 (Clarify that InPlaceIterable guarantees extend to all advancing iterator methods.) - #81563 (Improve docblock readability on small screen) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-01-31Rollup merge of #81563 - pickfire:patch-6, r=GuillaumeGomezJonas Schievink-0/+4
Improve docblock readability on small screen Before ![image](https://user-images.githubusercontent.com/4687791/106363174-f77bdf00-6361-11eb-898f-d480b8460ab3.png) After ![image](https://user-images.githubusercontent.com/4687791/106363259-6bb68280-6362-11eb-85a1-ef9262681dd7.png) Too much space is wasted on the left side. I wanted to make that 0 but it breaks some part with error symbols. 0 ![image](https://user-images.githubusercontent.com/4687791/106363287-90aaf580-6362-11eb-88c1-62a8313988a7.png) After ![image](https://user-images.githubusercontent.com/4687791/106363276-825cd980-6362-11eb-86eb-6f4611b4ab99.png)
2021-01-31Rollup merge of #81558 - pickfire:patch-5, r=GuillaumeGomezJonas Schievink-1/+2
Fix ascii art text wrapping in mobile Fix #81377 Before ![image](https://user-images.githubusercontent.com/4687791/106362405-a1a53800-635d-11eb-87b9-2f40bbd023bf.png) ![image](https://user-images.githubusercontent.com/4687791/106362410-aa960980-635d-11eb-96ee-979251b213a3.png) ![image](https://user-images.githubusercontent.com/4687791/106362562-80911700-635e-11eb-97ee-b19a6ea2fc6d.png) After ![image](https://user-images.githubusercontent.com/4687791/106362428-b4b80800-635d-11eb-8d5b-e4f51f5501ee.png) ![image](https://user-images.githubusercontent.com/4687791/106362433-bbdf1600-635d-11eb-96af-7043c74b3a0a.png) ![image](https://user-images.githubusercontent.com/4687791/106362570-8f77c980-635e-11eb-928d-ef1d26c13136.png) Note the second image is scrolled to the back (right), I added some padding for the text block (not the code block) to make it more comfortable to read since the last character is stuck to the last character.
2021-01-31Rollup merge of #81509 - 0yoyoyo:fix-issue-72685-ice-drop-in-place, r=estebankJonas Schievink-10/+22
Add a regression test for ICE of bad_placeholder_type Add a regression test for #72685. Check the error message is output instead of ICE.
2021-01-31Rollup merge of #81491 - jryans:rustdoc-deref-ice-81395, r=GuillaumeGomezJonas Schievink-7/+26
Balance sidebar `Deref` cycle check with main content The `Deref` cycle checks added as part of #80653 were "unbalanced" in the sense that the main content code path checks for cycles _before_ descending, while the sidebar checks _after_. Checking _before_ is correct, so this changes the sidebar path to match the main content path. Fixes #81395 r? ```@GuillaumeGomez```
2021-01-31Rollup merge of #81472 - Aaron1011:fix/revert-cursor-clone, r=petrochenkovJonas Schievink-0/+40
Clone entire `TokenCursor` when collecting tokens Reverts PR #80830 Fixes taiki-e/pin-project#312 We can have an arbitrary number of `None`-delimited group frames pushed on the stack due to proc-macro invocations, which can legally be exited. Attempting to account for this would add a lot of complexity for a tiny performance gain, so let's just use the original strategy.
2021-01-31Rollup merge of #81422 - estebank:dotdot_sugg, r=davidtwcoJonas Schievink-2/+2
Account for existing `_` field pattern when suggesting `..` Follow up to #80017.
2021-01-31Rollup merge of #80470 - SimonSapin:array-intoiter-type, r=m-ou-seJonas Schievink-2/+0
Stabilize by-value `[T; N]` iterator `core::array::IntoIter` Tracking issue: https://github.com/rust-lang/rust/issues/65798 This is unblocked now that `min_const_generics` has been stabilized in https://github.com/rust-lang/rust/pull/79135. This PR does *not* include the corresponding `IntoIterator` impl, which is https://github.com/rust-lang/rust/pull/65819. Instead, an iterator can be constructed through the `new` method. `new` would become unnecessary when `IntoIterator` is implemented and might be deprecated then, although it will stay stable.
2021-01-30Auto merge of #81560 - flip1995:clippyup, r=Manishearthbors-453/+6060
Update Clippy r? `@Manishearth` Biweekly Clippy update (2 days late)
2021-01-30Remove const_in_array_rep_exprkadmin-101/+20
2021-01-30add suggestion for nested fieldsb-naber-0/+165
2021-01-30Add a test for #71202Ömer Sinan Ağacan-0/+33
Closes #71202
2021-01-30Update clippy test output for panic macros.Mara Bos-4/+19