about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2021-08-23When checking associated type bounds, use bound vars for GAT params in param_envjackh726-0/+15
2021-08-23Doctest persist full binaries when persistingPatrick Conrad-1/+1
fix: #88110
2021-08-23Auto merge of #88265 - m-ou-se:rollup-soymv20, r=m-ou-sebors-51/+256
Rollup of 6 pull requests Successful merges: - #87976 (Account for tabs when highlighting multiline code suggestions) - #88174 (Clarify some wording in Rust 2021 lint docs) - #88188 (Greatly improve limitation handling on parallel rustdoc GUI test run) - #88230 (Fix typos “a”→“an”) - #88232 (Add notes to macro-not-found diagnostics to point out how things with the same name were not a match.) - #88259 (Do not mark `-Z thir-unsafeck` as unsound anymore) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-08-23add trailing newlineNiko Matsakis-1/+1
2021-08-23select obligations after `check_casts`liudingming-0/+33
Otherwise, we can get into a situation where you have a subtype obligation `#1 <: #2` pending, #1 is constrained by `check_casts`, but #2` is unaffected. Co-authored-by: Niko Matsakis <niko@alum.mit.edu>
2021-08-23Rollup merge of #88232 - m-ou-se:macro-name-imported-but-not-macro, r=estebankMara Bos-1/+198
Add notes to macro-not-found diagnostics to point out how things with the same name were not a match. This adds notes like: ``` error: cannot find derive macro `Serialize` in this scope --> $DIR/issue-88206.rs:22:10 | LL | #[derive(Serialize)] | ^^^^^^^^^ | note: `Serialize` is imported here, but it is not a derive macro --> $DIR/issue-88206.rs:17:11 | LL | use hey::{Serialize, Deserialize}; | ^^^^^^^^^ ``` Fixes https://github.com/rust-lang/rust/issues/88206 Includes https://github.com/rust-lang/rust/pull/88229 r? `@estebank`
2021-08-23Rollup merge of #88230 - steffahn:a_an, r=oli-obkMara Bos-40/+40
Fix typos “a”→“an” Fix typos in comments; found using a regex to find some easy instance of incorrect usage of a vs. an. While automation was used to find these, every change was checked manually. Changes in submodules get separate PRs: * https://github.com/rust-lang/stdarch/pull/1201 * https://github.com/rust-lang/cargo/pull/9821 * https://github.com/rust-lang/miri/pull/1874 * https://github.com/rust-lang/rls/pull/1746 * https://github.com/rust-analyzer/rust-analyzer/pull/9984 _folks @ rust-analyzer are fast at merging…_ * https://github.com/rust-analyzer/rust-analyzer/pull/9985 * https://github.com/rust-analyzer/rust-analyzer/pull/9987 * https://github.com/rust-analyzer/rust-analyzer/pull/9989 _For `clippy`, I don’t know if the changes should better better be moved to a PR to the original repo._ <hr> This has some overlap with #88226, but neither is a strict superset of the other. If you want multiple commits, I can split it up; in that case, make sure to suggest a criterion for splitting.
2021-08-23Rollup merge of #88188 - GuillaumeGomez:rustdoc-gui-parallel-limit, r=dns2utf8Mara Bos-10/+18
Greatly improve limitation handling on parallel rustdoc GUI test run Follow-up of https://github.com/rust-lang/rust/pull/88082. r? `@dns2utf8`
2021-08-23Auto merge of #87676 - sexxi-goose:truncate_unique, r=nikomatsakisbors-16/+16
2229: Handle MutBorrow/UniqueImmBorrow better We only want to use UniqueImmBorrow when the capture place is truncated and we drop Deref of a MutRef. r? `@nikomatsakis` Fixes: https://github.com/rust-lang/project-rfc-2229/issues/56
2021-08-23Improve wording of macro-not-found-but-name-exists note.Mara Bos-2/+2
2021-08-23Show what things are, but also what they are not.Mara Bos-7/+7
2021-08-23Don't confuse the user with notes about tool modules.Mara Bos-8/+0
2021-08-23Clarify what attribute and derive macros look like.Mara Bos-6/+6
2021-08-23Say what things are, instead of what they are not.Mara Bos-32/+50
2021-08-23Silence confusing 'unused import' warnings.Mara Bos-39/+18
2021-08-23Update tests.Mara Bos-1/+26
2021-08-23Add tests for macro-not-found diagnostics.Mara Bos-44/+183
2021-08-23Add test for macro-not-found-but-name-imported-here note.Mara Bos-0/+44
2021-08-23Auto merge of #87661 - FabianWolff:issue-87461, r=estebankbors-0/+50
Improve error reporting for closure return type mismatches Fixes #87461.
2021-08-23Detect incorrect number of lang item genericsasquared31415-80/+131
2021-08-23Greatly improve limitation handling on parallel rustdoc GUI test runGuillaume Gomez-10/+18
2021-08-23Include ld64 nexte to ld for use with -Z gcc-ldHans Kratz-0/+6
2021-08-23:arrow_up: rust-analyzerLaurențiu Nicola-17/+20
2021-08-23add Cell::as_array_of_cells, similar to Cell::as_slice_of_cellsJack O'Connor-0/+9
Previously, converting `&mut [T; N]` to `&[Cell<T>; N]` looks like this: let array = &mut [1, 2, 3]; let cells: &[Cell<i32>; 3] = Cell::from_mut(&mut array[..]) .as_slice_of_cells() .try_into() .unwrap(); With this new helper method, it looks like this: let array = &mut [1, 2, 3]; let cells: &[Cell<i32>; 3] = Cell::from_mut(array).as_array_of_cells();
2021-08-22Update asm docsasquared31415-19/+20
2021-08-23Auto merge of #88210 - spastorino:diff-lifetimes-def-use-test, r=oli-obkbors-0/+29
Test TAITs different lifetimes in defining uses fail r? `@oli-obk` Related to #86727
2021-08-22Fix: appeased x.py test tidy --blesslinux1-2/+2
2021-08-22Feat: further testing & support for i64 general register uselinux1-6/+46
2021-08-22Fix: moved #[no_mangle]linux1-3/+1
2021-08-22Refactor: added #[no_mangle]linux1-0/+2
2021-08-22Feat: added s390x reg-definitions, constraint codes, and testslinux1-0/+86
2021-08-22Auto merge of #88240 - GuillaumeGomez:rollup-wdom91m, r=GuillaumeGomezbors-15/+90
Rollup of 7 pull requests Successful merges: - #86747 (Improve wording of the `drop_bounds` lint) - #87166 (Show discriminant before overflow in diagnostic for duplicate values.) - #88077 (Generate an iOS LLVM target with a specific version) - #88164 (PassWrapper: adapt for LLVM 14 changes) - #88211 (cleanup: `Span::new` -> `Span::with_lo`) - #88229 (Suggest importing the right kind of macro.) - #88238 (Stop tracking namespace in used_imports.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2021-08-22Rollup merge of #88229 - m-ou-se:macro-suggest-right-kind, r=estebankGuillaume Gomez-0/+52
Suggest importing the right kind of macro. Fixes #88228. r? `@estebank`
2021-08-22Rollup merge of #88211 - petrochenkov:withhilo, r=jyn514Guillaume Gomez-3/+3
cleanup: `Span::new` -> `Span::with_lo` Extracted from https://github.com/rust-lang/rust/pull/84373 as suggested in https://github.com/rust-lang/rust/pull/84373#issuecomment-857773867. It turned out less useful then I expected, but anyway. r? `@cjgillot` `@bors` rollup
2021-08-22Rollup merge of #87166 - de-vri-es:show-discriminant-before-overflow, r=jackh726Guillaume Gomez-5/+28
Show discriminant before overflow in diagnostic for duplicate values. This PR adds the value before overflow for explicit discriminant values in the error for duplicate discriminant values. I found it rather confusing to see only the overflowed value. It only does this for literals, since overflows in const evaluated arithmetic are already a hard error. This is my first PR to the compiler, so please let me know if the implementation can be improved :) Before: ![image](https://user-images.githubusercontent.com/786213/125850097-bf5fb7e0-d800-4386-a738-c30f41822964.png) After: ![image](https://user-images.githubusercontent.com/786213/125850120-e2bb765d-ad86-4888-a6cb-dec34fba3fea.png)
2021-08-22Rollup merge of #86747 - FabianWolff:issue-86653, r=GuillaumeGomezGuillaume Gomez-7/+7
Improve wording of the `drop_bounds` lint This PR addresses #86653. The issue is sort of a false positive of the `drop_bounds` lint, but I would argue that the best solution for #86653 is simply a rewording of the warning message and lint description, because even if the lint is _technically_ wrong, it still forces the programmer to think about what they are doing, and they can always use `#[allow(drop_bounds)]` if they think that they really need the `Drop` bound. There are two issues with the current warning message and lint description: - First, it says that `Drop` bounds are "useless", which is technically incorrect because they actually do have the effect of allowing you e.g. to call methods that also have a `Drop` bound on their generic arguments for some reason. I have changed the wording to emphasize not that the bound is "useless", but that it is most likely not what was intended. - Second, it claims that `std::mem::needs_drop` detects whether a type has a destructor. But I think this is also technically wrong: The `Drop` bound says whether the type has a destructor or not, whereas `std::mem::needs_drop` also takes nested types with destructors into account, even if the top-level type does not itself have one (although I'm not 100% sure about the exact terminology here, i.e. whether the "drop glue" of the top-level type counts as a destructor or not). cc `@jonhoo,` does this solve the issue for you? r? `@GuillaumeGomez`
2021-08-22Auto merge of #88166 - BoxyUwU:const-equate-canon, r=lcnrbors-0/+203
canonicalize consts before calling try_unify_abstract_consts query Fixes #88022 Fixes #86953 Fixes #77708 Fixes #82034 Fixes #85031 these ICEs were all caused by calling the `try_unify_abstract_consts` query with inference vars in substs r? `@lcnr`
2021-08-22Fix typos “an”→“a” and a few different ones that appeared in the ↵Frank Steffahn-8/+8
same search
2021-08-22Fix more “a”/“an” typosFrank Steffahn-4/+4
2021-08-22Revert "Revert "Don't load all extern crates unconditionally""Joshua Nelson-41/+100
This reverts commit 5f0c54db4e595a6a77048f2b0605138ffa49a326.
2021-08-22Test TAITs different lifetimes in defining uses failSantiago Pastorino-0/+29
2021-08-22Fix more “a”/“an” typosFrank Steffahn-5/+5
2021-08-22Fix typos “a”→“an”Frank Steffahn-23/+23
2021-08-22Auto merge of #88163 - camsteffen:collapsible-match-fix, r=Manishearthbors-150/+136
Fix clippy::collapsible_match with let expressions This fixes rust-lang/rust-clippy#7575 which is a regression from #80357. I am fixing the bug here instead of in the clippy repo (if that's okay) because a) the regression has not been synced yet and b) I would like to land the fix on nightly asap. The fix is basically to re-generalize `match` and `if let` for the lint implementation (they were split because `if let` no longer desugars to `match` in the HIR). Also fixes rust-lang/rust-clippy#7586 and fixes rust-lang/rust-clippy#7591 cc `@rust-lang/clippy` `@xFrednet` do you want to review this?
2021-08-22Suggest importing the right kind of macro.Mara Bos-0/+52
2021-08-22Auto merge of #88139 - lcnr:marker-trait-attr, r=nikomatsakisbors-0/+83
marker_traits: require `EvaluatedToOk` during winnowing closes #84955, while it doesn't really fix it in a way that makes me happy it should prevent the issue for now and this test can't be reproduced anyways, so it doesn't make much sense to keep it open. fixes #84917 as only one of the impls depends on regions, so we now drop the ambiguous one instead of the correct one. cc https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/winnowing.20soundly/near/247899832 r? `@nikomatsakis`
2021-08-22Move Cache from Context to SharedContextJoshua Nelson-49/+38
2021-08-21Bless testsNoah Lev-17/+53
2021-08-21Improve errors for recursive type aliasesNoah Lev-18/+18
2021-08-21Rollup merge of #88201 - spastorino:tait-incomplete-inference-test, r=oli-obkJack Huey-0/+36
Test that incomplete inference for TAITs fail r? `@oli-obk` Related to #86727