jackh726
d9242ff0aa
When checking associated type bounds, use bound vars for GAT params in param_env
2021-08-23 17:45:04 -04:00
Rémy Rakic
820e2680ec
handle ascription type op in NLL HRTB diagnostics
...
Refactors the `type_op_ascribe_user_type` query into a version which
accepts a span, and uses it in the nicer NLL HRTB bound region errors.
2021-08-23 23:31:01 +02:00
Aman Arora
ed43e02e8c
2229: Update signature for truncate function
2021-08-23 17:15:52 -04:00
bors
a49e38e672
Auto merge of #88265 - m-ou-se:rollup-soymv20, r=m-ou-se
...
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-23 20:10:29 +00:00
Niko Matsakis
e49323b07d
add trailing newline
2021-08-23 19:53:18 +00:00
Niko Matsakis
754d51ebe4
useful debug printouts
...
The changes to dumping expressions seem particularly useful
2021-08-23 19:16:48 +00:00
Niko Matsakis
af15e529db
fix apparent typo in resolving variables
2021-08-23 19:16:48 +00:00
liudingming
e8910440a2
select obligations after check_casts
...
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-23 19:16:16 +00:00
Mara Bos
e710132616
Rollup merge of #88259 - LeSeulArtichaut:complete-thir-unsafeck, r=oli-obk
...
Do not mark `-Z thir-unsafeck` as unsound anymore
The initial implementation of the THIR unsafety checker is now complete (rust-lang/project-thir-unsafeck#7 ).
r? `@oli-obk`
2021-08-23 20:45:51 +02:00
Mara Bos
c31e02a24c
Rollup merge of #88232 - m-ou-se:macro-name-imported-but-not-macro, r=estebank
...
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-23 20:45:50 +02:00
Mara Bos
5cf025f076
Rollup merge of #88230 - steffahn:a_an, r=oli-obk
...
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-23 20:45:49 +02:00
Mara Bos
6d1c5b6360
Rollup merge of #88188 - GuillaumeGomez:rustdoc-gui-parallel-limit, r=dns2utf8
...
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-23 20:45:48 +02:00
Mara Bos
d486ce75bc
Rollup merge of #88174 - camelid:clarify-rust-2021-lint-docs, r=m-ou-se
...
Clarify some wording in Rust 2021 lint docs
Also added some inline code styling.
2021-08-23 20:45:47 +02:00
Mara Bos
70aec8d7fb
Rollup merge of #87976 - estebank:fix-suggestion-span-coloring, r=m-ou-se
...
Account for tabs when highlighting multiline code suggestions
Address `'\t'` case in #87972 .
Before:
![Screen Shot 2021-08-12 at 8 52 27 AM](https://user-images.githubusercontent.com/1606434/129228214-e5cfd203-9aa8-41c7-acd9-ce255ef8a21e.png )
After:
![Screen Shot 2021-08-12 at 8 52 15 AM](https://user-images.githubusercontent.com/1606434/129228236-57c951fc-c8cf-4901-989f-b9b5aa5eebca.png )
2021-08-23 20:45:40 +02:00
bors
9583fd1bdd
Auto merge of #87676 - sexxi-goose:truncate_unique, r=nikomatsakis
...
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-23 17:27:23 +00:00
Mara Bos
908ce2fd1f
Improve wording of macro-not-found-but-name-exists note.
2021-08-23 16:57:59 +02:00
Mara Bos
4e22bf47d0
Show what things are, but also what they are not.
2021-08-23 16:57:59 +02:00
Mara Bos
a13c66e0a5
Don't confuse the user with notes about tool modules.
2021-08-23 16:57:59 +02:00
Mara Bos
4bd415f70a
Clarify what attribute and derive macros look like.
2021-08-23 16:57:58 +02:00
Mara Bos
5dea5d7549
Say what things are, instead of what they are not.
2021-08-23 16:57:58 +02:00
Mara Bos
d834d2a742
Silence confusing 'unused import' warnings.
2021-08-23 16:57:58 +02:00
Mara Bos
ce95a57a72
Update tests.
2021-08-23 16:43:54 +02:00
Mara Bos
11c879d209
Add tests for macro-not-found diagnostics.
2021-08-23 16:43:54 +02:00
Mara Bos
7977cb43b0
Look for macro names in all namespaces for diagnostics.
2021-08-23 16:43:54 +02:00
Mara Bos
9051c056ed
Add test for macro-not-found-but-name-imported-here note.
2021-08-23 16:43:54 +02:00
Mara Bos
fed6131c41
Add note to 'macro not found' to point to identically-named imports.
2021-08-23 16:43:54 +02:00
bors
52c881ff52
Auto merge of #87661 - FabianWolff:issue-87461, r=estebank
...
Improve error reporting for closure return type mismatches
Fixes #87461 .
2021-08-23 14:41:14 +00:00
Esteban Kuber
955e913612
review comments
2021-08-23 14:31:48 +00:00
asquared31415
385a233f18
Detect incorrect number of lang item generics
2021-08-23 10:15:25 -04:00
Andreas Liljeqvist
d92810646e
Simplify zero check
2021-08-23 15:52:47 +02:00
Andreas Liljeqvist
32d7e5b723
add with_start
and with_end
2021-08-23 15:44:56 +02:00
Andreas Liljeqvist
d230b92ba7
implement debug in similar way to RangeInclusive
2021-08-23 15:05:40 +02:00
Léo Lanteri Thauvin
6a2b448f2a
Do not mark -Z thir-unsafeck
as unsound anymore
2021-08-23 14:52:42 +02:00
Andreas Liljeqvist
e8e6d9bd86
Rename to WrappingRange
2021-08-23 14:24:34 +02:00
Guillaume Gomez
b7fe005eef
Greatly improve limitation handling on parallel rustdoc GUI test run
2021-08-23 14:23:59 +02:00
Andreas Liljeqvist
70433955f4
implement contains_zero method
2021-08-23 14:20:38 +02:00
Andreas Liljeqvist
d50abd0249
Use ref
2021-08-23 14:18:48 +02:00
Esteban Kuber
31d07edc94
remove unnecessary info!()
logging
2021-08-23 11:58:19 +00:00
Esteban Kuber
5626346ac9
Fixes to span locations
2021-08-23 11:58:19 +00:00
Esteban Kuber
a29a624f86
wip
2021-08-23 11:58:19 +00:00
Esteban Kuber
75fd1bf1e6
Account for tabs when highlighting multiline code suggestions
2021-08-23 11:58:18 +00:00
Andreas Liljeqvist
225a4bf922
Removed fixed fixme
2021-08-23 13:56:28 +02:00
bors
5998c2e9ad
Auto merge of #88249 - lnicola:rust-analyzer-2021-08-23, r=lnicola
...
⬆️ rust-analyzer
2021-08-23 10:46:31 +00:00
Andreas Liljeqvist
c3fdefe142
remove commented code
2021-08-23 11:21:27 +02:00
bors
33fdb797f5
Auto merge of #88220 - sunfishcode:sunfishcode/unix-listener-io-safety, r=joshtriplett
...
Implement `AsFd` etc. for `UnixListener`.
Implement `AsFd`, `From<OwnedFd>`, and `Into<OwnedFd>` for
`UnixListener`. This is a follow-up to #87329 .
r? `@joshtriplett`
2021-08-23 07:36:49 +00:00
Laurențiu Nicola
0a3a457d54
⬆️ rust-analyzer
2021-08-23 09:01:38 +03:00
bors
1c0485610e
Auto merge of #87598 - ccqpein:master, r=yaahc
...
Add doctests for HashMap's into_values and into_keys methods
Fixes #87591
2021-08-23 05:06:29 +00:00
Jack O'Connor
9c44d80c83
add Cell::as_array_of_cells, similar to Cell::as_slice_of_cells
...
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-23 01:00:34 -04:00
bors
49967357c5
Auto merge of #88210 - spastorino:diff-lifetimes-def-use-test, r=oli-obk
...
Test TAITs different lifetimes in defining uses fail
r? `@oli-obk`
Related to #86727
2021-08-23 02:25:36 +00:00
Dan Gohman
a0ce5f25fa
Remove redundant conversions.
2021-08-22 16:51:30 -07:00