Commit Graph

415 Commits

Author SHA1 Message Date
csmoe 64f61c7888 remove indexed_vec re-export from rustc_data_structures 2019-09-29 16:48:31 +00:00
varkor bea3d67c77 Rename `subst::Kind` to `subst::GenericArg` 2019-09-26 11:48:05 +01:00
bors dc45735f29 Auto merge of #64513 - varkor:sty-begone, r=eddyb
Rename `TyS.sty` to `TyS.kind`

Fixes https://github.com/rust-lang/rust/issues/64353.

r? @eddyb
2019-09-26 04:29:18 +00:00
varkor e2e0f9af85 Rename `sty` to `kind` 2019-09-25 15:50:04 +01:00
Mark Rousskov f359a94849 Snap cfgs to new beta 2019-09-25 08:42:46 -04:00
Alexander Regueiro c1d29ee3c7 Aggregation of cosmetic changes made during work on REPL PRs: librustc 2019-09-07 16:27:19 +01:00
Oliver Scherer 26e9990198 Add a "diagnostic item" scheme
This allows lints and other diagnostics to refer to items
by a unique ID instead of relying on whacky path
resolution schemes that may break when items are
relocated.
2019-08-30 01:00:55 +02:00
Esteban Küber 3890befa8e review comment 2019-08-24 14:54:35 -07:00
Esteban Küber 73e3508bb8 Suggest calling closure with resolved return type when appropriate 2019-08-23 11:59:04 -07:00
Oliver Scherer 7dbc4b95fc Remove some duplication when resolving constants 2019-08-21 02:29:08 +02:00
bors a807902dd6 Auto merge of #63463 - matthewjasper:ty_param_cleanup, r=petrochenkov
Don't special case the `Self` parameter by name

This results in a couple of small diagnostic regressions. They could be avoided by keeping the special case just for diagnostics, but that seems worse.

closes #50125
cc #60869
2019-08-19 01:31:35 +00:00
bors 9e9a136fce Auto merge of #63575 - Centril:rollup-anlv9g5, r=Centril
Rollup of 11 pull requests

Successful merges:

 - #62984 (Add lint for excess trailing semicolons)
 - #63075 (Miri: Check that a ptr is aligned and inbounds already when evaluating `*`)
 - #63490 (libsyntax: cleanup and refactor `pat.rs`)
 - #63507 (When needing type annotations in local bindings, account for impl Trait and closures)
 - #63509 (Point at the right enclosing scope when using `await` in non-async fn)
 - #63528 (syntax: Remove `DummyResult::expr_only`)
 - #63537 (expand: Unimplement `MutVisitor` on `MacroExpander`)
 - #63542 (Add NodeId for Arm, Field and FieldPat)
 - #63543 (Merge Variant and Variant_)
 - #63560 (move test that shouldn't be in test/run-pass/)
 - #63570 (Adjust tracking issues for `MaybeUninit<T>` gates)

Failed merges:

r? @ghost
2019-08-15 00:32:05 +00:00
Mark Rousskov 2601c86487 Handle cfg(bootstrap) throughout 2019-08-14 05:39:53 -04:00
Esteban Küber 3b6d46c640 Resolve types when suggesting boxed closure 2019-08-12 18:12:19 -07:00
Matthew Jasper 2f6babbc6d Remove `is_self` and `has_self_ty` methods 2019-08-11 15:00:42 +01:00
Ralf Jung 8e6fbbec83 add tuple_fields convenience method and use it in a few places 2019-08-11 12:04:49 +02:00
bors d4abb08be6 Auto merge of #61919 - alexreg:fix-atb-1, r=nikomatsakis
Fix for "ambiguous associated type" issue with ATBs

Fixes #61752.

r? @nikomatsakis

CC @Centril
2019-08-07 09:33:34 +00:00
Oliver Scherer bd57498e7d Get rid of one more useless `lift` invocation 2019-08-05 17:49:40 +02:00
Oliver Scherer 2d86d040a5 Address comment and formatting nits 2019-08-05 17:48:05 +02:00
Oliver Scherer f4f957d00b Clear the ParamEnv where its information is irrelevant 2019-08-05 17:48:05 +02:00
Oliver Scherer 7710820d18 Fiddle param env through to `try_eval_bits` in most places 2019-08-05 17:48:05 +02:00
Oliver Scherer 9b87d22ea8 Don't abort on unevaluated constants without at least tryting to eval them 2019-08-05 17:48:04 +02:00
Oliver Scherer 437f017e2e Clean up the `ty::Const::assert*` methods 2019-08-05 17:48:04 +02:00
Alexander Regueiro 8f9ca24f55 A few cosmetic improvements. 2019-08-05 15:16:27 +01:00
bors 8e917f4838 Auto merge of #62946 - RalfJung:miri_type_dispatch_first, r=oli-obk
Miri: dispatch first on the type

Based on the fact that Miri now always has intptrcast available, we can change binops and casts to first check the type of the source operand and then decide based on that what to do, instead of considering the value (pointer vs bits) first.
2019-08-03 08:33:07 +00:00
Ralf Jung 7b30612c9b add is_any_ptr type test; this also helps pacify tidy 2019-08-02 23:04:11 +02:00
varkor c28ce3e4ca Replace "existential" by "opaque" 2019-08-02 02:44:36 +01:00
Ralf Jung 057606264f clarify and unify some type test names 2019-07-26 08:50:15 +02:00
Vadim Petrochenkov 614037171b cleanup: Remove `extern crate serialize as rustc_serialize`s 2019-07-23 19:20:16 +03:00
flip1995 d0625a380b
Allow usage_of_ty_tykind only in sty
and in some special cases
2019-06-24 18:14:53 +02:00
John Kåre Alsaker 007aabae93 Remove unnecessary lift calls 2019-06-14 21:11:50 +02:00
Eduard-Mihai Burtescu afc39bbf24 Run `rustfmt --file-lines ...` for changes from previous commits. 2019-06-14 18:58:32 +03:00
Eduard-Mihai Burtescu f3f9d6dfd9 Unify all uses of 'gcx and 'tcx. 2019-06-14 18:58:23 +03:00
Eduard-Mihai Burtescu fff08cb043 Run `rustfmt --file-lines ...` for changes from previous commits. 2019-06-12 13:38:28 +03:00
Eduard-Mihai Burtescu 17cdd356da rustc: replace `TyCtxt<'tcx, 'gcx, 'tcx>` with `TyCtxt<'gcx, 'tcx>`. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu 2441253508 Fix fallout from `deny(unused_lifetimes)`. 2019-06-12 13:38:27 +03:00
Eduard-Mihai Burtescu 37799a5552 rustc: replace `TyCtxt<'a, 'gcx, 'tcx>` with `TyCtxt<'tcx, 'gcx, 'tcx>`. 2019-06-12 13:38:27 +03:00
Mazdak Farrokhzad ba5b04ac46
Rollup merge of #61688 - RalfJung:is-floating-point, r=cramertj
is_fp and is_floating_point do the same thing, remove the former

also consistently mark all these `is_*` methods for inlining
2019-06-12 04:22:53 +02:00
Ralf Jung 87d5fe0e53 is_fp and is_floating_point do the same thing, remove the former
also consistently mark all these is_* methods for inlining
2019-06-11 19:46:16 +02:00
Eduard-Mihai Burtescu 774724be3c rustc: deny(unused_lifetimes). 2019-06-11 14:11:58 +03:00
Ralf Jung 2ad303eb07 make floating point casts nicer with generics 2019-06-09 12:51:07 +02:00
Yuki Okushi 8f34a50cc5 Remove ty::BrFresh and new_bound 2019-05-31 15:09:04 +09:00
Mazdak Farrokhzad 16ef483b79
Rollup merge of #61164 - RalfJung:scalar, r=oli-obk
rename Scalar::Bits to Scalar::Raw and bits field to data

Also use this opportunity to seal some abstraction leaks (other modules constructing `Scalar::Bits` directly instead of using a constructor).

r? @oli-obk
2019-05-28 18:15:39 +02:00
Andrew Xu 46b9ed4fa1 Rename "Associated*" to "Assoc*"
We are going to uniform the terminology of all associated items.
Methods that may or may not have `self` are called "associated
functions". Because `AssociatedFn` is a bit long, we rename `Associated`
to `Assoc`.
2019-05-26 17:49:02 +08:00
Ralf Jung 082da0c698 rename Scalar::Bits to Scalar::Raw and bits field to data 2019-05-26 11:08:03 +02:00
Oliver Scherer fa17654f79 Make `ConstValue::Slice` solely take `[u8]` and `str` 2019-05-25 10:07:01 +02:00
Oliver Scherer e694b63cd1 Don't use `ty::Const` without immediately interning 2019-05-25 10:07:01 +02:00
Vadim Petrochenkov 59a382122f Simplify use of keyword symbols 2019-05-22 19:48:56 +03:00
Mazdak Farrokhzad 581cf70367
Rollup merge of #60959 - petrochenkov:sassert, r=estebank
rustc: Improve type size assertions

Now they
- Tell what the new size is, when it changes
- Do not require passing an identifier

```
   ::: src\libsyntax\parse\token.rs:223:1
    |
223 |    static_assert_size!(Token, 123);
    |    -------------------------------- in this macro invocation
    |
    = note: expected type `[(); 123]`
               found type `[(); 16]`
```
2019-05-20 23:03:07 +02:00
Nicholas Nethercote b96be5b188 Avoid `as_str()` in `ParamTy::is_self`.
It's a hot function, and a direct `Symbol` comparison is faster.

The patch also converts some `&InternedString`s to `InternedString`.
2019-05-20 09:16:26 +10:00