Santiago Pastorino
7b1e1c7333
add VecMap docs
2021-06-08 17:17:48 -03:00
Santiago Pastorino
cad762b1e2
Use impl FnMut directly as predicate type
2021-06-08 17:17:48 -03:00
Santiago Pastorino
ed94da14ed
Explicitly pass find arguments down the predicate so coercions can apply
2021-06-08 17:17:47 -03:00
Santiago Pastorino
0ad09f9386
Do not deconstruct OpaqueTypeKey to make the code more clear
2021-06-08 17:17:45 -03:00
Santiago Pastorino
ecd78e985e
defin_ty_def_id -> definition_ty_def_id
2021-06-08 16:45:44 -03:00
bjorn3
2bf839e870
Don't require LintStore to live for 'a in configure_and_expand_inner
2021-06-08 19:24:17 +02:00
bjorn3
cf1f92a2ca
Revert "Let several methods take &Resolver instead of a BoxedResolver wrapper"
...
This reverts commit 5343ec338f72a61e2f51f9d90117092c8e8a725a.
2021-06-08 19:24:17 +02:00
bjorn3
5e148200d4
Use a submodule as safety boundary for BoxedResolver
2021-06-08 19:24:17 +02:00
bjorn3
86c2d1a2a7
Don't use a generator for BoxedResolver
...
The generator is non-trivial and requires unsafe code anyway. Using
regular unsafe code without a generator is much easier to follow.
2021-06-08 19:24:17 +02:00
bjorn3
36bdfdc411
Don't return a BoxedResolver on errors
2021-06-08 19:24:17 +02:00
bjorn3
9d9ccec3fc
Inline two more methods
2021-06-08 19:24:17 +02:00
bjorn3
d376f032e6
Let several methods take &Resolver instead of a BoxedResolver wrapper
2021-06-08 19:24:16 +02:00
bjorn3
db4d8e2cab
Store boxed metadata loader in CrateLoader
2021-06-08 19:24:16 +02:00
bjorn3
ecc68e7879
Replace Pin::new with .as_mut()
2021-06-08 19:24:16 +02:00
bjorn3
bddf151dea
Use more accurate lifetimes
2021-06-08 19:24:16 +02:00
bjorn3
1b7ec34878
Inline PinnedGenerator
2021-06-08 19:24:16 +02:00
bjorn3
99e112d282
Inline the rest of box_region
2021-06-08 19:24:16 +02:00
bjorn3
86b3ebe2da
Inline box_region macro calls
2021-06-08 19:24:15 +02:00
bjorn3
8f397bc8a0
Simplify box_region macros
2021-06-08 19:24:15 +02:00
Santiago Pastorino
f07412db41
Destructure OpaqueTypeKey in certain cases to simplify code
2021-06-08 10:13:54 -03:00
Santiago Pastorino
1278f3f295
Simplify code by using VecMap::get_by
2021-06-08 09:41:26 -03:00
Santiago Pastorino
dd56ec653c
Add VecMap::get_by(FnMut -> bool)
2021-06-08 09:40:58 -03:00
Ellen
47fe696d8f
use non_erasable_generics
2021-06-08 09:07:52 +01:00
Ellen
8e7299dfcd
Support as casts in abstract consts
2021-06-08 08:02:16 +01:00
Yuki Okushi
b7fadfddcb
Rollup merge of #86103 - camsteffen:lifetime-hack, r=jackh726
...
Remove lifetime hack
It compiles without the hack. But I don't know why. I can't get the example in the referenced issue to compile...
2021-06-08 13:26:38 +09:00
Yuki Okushi
2e8ffed861
Rollup merge of #86096 - FabianWolff:ec-E0316, r=GuillaumeGomez
...
Comment out unused error codes and add description for E0316
I have added an extended description of `E0316` and commented out a bunch of unused error codes to make clear the fact that they are no longer in use. You can check for yourself with
```shell
for ec in \
E0314 E0315 E0473 E0474 E0475 E0479 E0480 E0481 \
E0483 E0484 E0485 E0486 E0487 E0488 E0489
do
if [ ! -z "`grep -r $ec compiler/* --exclude-dir=rustc_error_codes`" ]
then
echo $ec
false
fi
done
```
i.e. these error codes appear nowhere in the compiler code and thus cannot be emitted.
r? ```@GuillaumeGomez```
2021-06-08 13:26:36 +09:00
Yuki Okushi
472dbec026
Rollup merge of #85906 - LingMan:iter_find, r=matthewjasper
...
Use `Iterator::find` instead of open-coding it
```@rustbot``` modify labels +C-cleanup +T-compiler
2021-06-08 13:26:28 +09:00
Aaron Hill
822f800ad7
Include macro name in 'local ambiguity' error
...
Currently, we only point at the span of the macro argument. When the
macro call is itself generated by another macro, this can make it
difficult or impossible to determine which macro is responsible for
producing the error.
2021-06-07 20:17:48 -05:00
Alex Crichton
aba85ff820
Enable rustdoc to document safe wasm intrinsics
...
This commit fixes an issue not found during #84988 where rustdoc is used
to document cross-platform intrinsics but it was requiring that
functions which use `#[target_feature]` are `unsafe` erroneously, even
if they're WebAssembly specific. Rustdoc today, for example, already has
a special case where it enables annotations like
`#[target_feature(enable = "simd128")]` on platforms other than
WebAssembly. The purpose of this commit is to relax the "require all
`#[target_feature]` functions are `unsafe`" requirement for all targets
whenever rustdoc is running, enabling all targets to fully document
other targets, such as WebAssembly, where intrinsics functions aren't
always `unsafe`.
2021-06-07 17:14:35 -07:00
Santiago Pastorino
9e547b4464
Differentiate different defining uses of taits when they reference distinct generic parameters
2021-06-07 19:10:12 -03:00
Santiago Pastorino
e386373514
Remove substs from OpaqueTypeDecl, use the one in OpaqueTypeKey
2021-06-07 19:09:32 -03:00
Santiago Pastorino
5dabd55d7d
Use substs from opaque type key instead of using it from opaque_decl
2021-06-07 19:08:43 -03:00
Santiago Pastorino
37ab718350
Make opaque type map key be of type OpaqueTypeKey
2021-06-07 19:07:24 -03:00
Santiago Pastorino
7294f49d52
Remove ResolvedOpaqueTy and just use Ty, SubstsRef is already there
2021-06-07 19:07:07 -03:00
Santiago Pastorino
7f8cad2019
Make OpaqueTypeKey the key of opaque types map
2021-06-07 19:04:52 -03:00
Santiago Pastorino
3405725e00
Change concrete opaque type to be a VecMap
2021-06-07 19:04:19 -03:00
Santiago Pastorino
2bc723fbca
Change opaque type map to be a VecMap
2021-06-07 19:03:57 -03:00
Santiago Pastorino
aa7024b0c7
Add VecMap to rustc_data_structures
2021-06-07 19:03:51 -03:00
Fabian Wolff
6206247335
Suggest a trailing comma if a 1-tuple is expected
2021-06-07 23:16:03 +02:00
Smitty
2f1c2193d1
Peephole optimize x == false
and x != true
2021-06-07 12:33:00 -04:00
Cameron Steffen
fb92c92a72
Remove lifetime hack
2021-06-07 10:00:58 -05:00
bors
e4a6032706
Auto merge of #85903 - bjorn3:rustc_serialize_cleanup, r=varkor
...
Remove unused functions and arguments from rustc_serialize
2021-06-07 14:40:26 +00:00
Fabian Wolff
c01d63ab76
Add E0316.md
2021-06-07 14:20:39 +02:00
Fabian Wolff
a20870bdb9
Comment out unused error codes in error_codes.rs
2021-06-07 13:01:04 +02:00
bors
2312ff1a85
Auto merge of #85891 - bjorn3:revert_merge_crate_disambiguator, r=Mark-Simulacrum
...
Revert "Merge CrateDisambiguator into StableCrateId"
This reverts https://github.com/rust-lang/rust/pull/85804
2021-06-07 10:42:56 +00:00
bjorn3
8176ab8bc1
Revert "Merge CrateDisambiguator into StableCrateId"
...
This reverts commit d0ec85d3fb
.
2021-06-07 10:37:45 +02:00
bjorn3
6c5b6985fd
Revert "Fix test"
...
This reverts commit 3abdebe79d
.
2021-06-07 10:25:32 +02:00
Yuki Okushi
7530c7d1bd
Rollup merge of #86081 - LingMan:try_into, r=jyn514
...
Use `try_into` instead of asserting manually
`@rustbot` modify labels +C-cleanup +T-compiler
2021-06-07 15:21:05 +09:00
Yuki Okushi
fa38fad5a2
Rollup merge of #86025 - bjorn3:no_rpath_cfg_prefix, r=jackh726
...
Remove the install prefix from the rpath set when using -Crpath
It was broken anyway for rustup installs and nobody seems to have noticed.
Fixes https://github.com/rust-lang/rust/issues/82392
2021-06-07 15:21:04 +09:00
Yuki Okushi
4144019847
Rollup merge of #86016 - luqmana:infer-linker-flavor, r=petrochenkov
...
Unify duplicate linker_and_flavor methods in rustc_codegen_{cranelift,ssa}.
The two methods were exactly the same so this removes the cranelift copy. This will help make sure both they don't get out of sync.
2021-06-07 15:21:03 +09:00