| Age | Commit message (Collapse) | Author | Lines |
|
|
|
|
|
|
|
We can do this now that opt_associated_item doesn't have any panicking paths.
|
|
The codegen implementation already works for this, so we're:
* propagating track_caller attr from trait def to impl
* relaxing errors
* adding tests
Approved in a recent lang team meeting:
https://github.com/rust-lang/lang-team/blob/master/minutes/2020-01-09.md
|
|
|
|
|
|
|
|
Remove some imports to the rustc crate
- When we have `NestedVisitorMap::None`, we use `type Map = dyn intravisit::Map<'v>;` instead of the actual map. This doesn't actually result in dynamic dispatch (in the future we may want to use an associated type default to simplify the code).
- Use `rustc_session::` imports instead of `rustc::{session, lint}`.
r? @Zoxc
|
|
Make methods declared by `newtype_index` macro `const`
Crates that use the macro to define an `Idx` type need to enable `#![feature(const_if_match, const_panic)]`.
|
|
|
|
Ensure HAS_FREE_LOCAL_NAMES is set for ReFree
This fixes a bug introduced by #69469.
I don't have any ideas on how to reate a regression test for this.
|
|
resolve/hygiene: `macro_rules` are not "legacy"
The "modern" vs "legacy" naming was introduced by jseyfried during initial implementation of macros 2.0.
At this point it's clear that `macro_rules` are not going anywhere and won't be deprecated in the near future.
So this PR changes the naming "legacy" (when it implies "macro_rules") to "macro_rules".
This should also help people reading this code because it's wasn't obvious that "legacy" actually meant "macro_rules" in these contexts.
The most contentious renaming here is probably
```
fn modern -> fn normalize_to_macros_2_0
fn modern_and_legacy -> fn normalize_to_macro_rules
```
Other alternatives that I could think of are `normalize_to_opaque`/`normalize_to_semitransparent`, or `strip_non_opaque`/`strip_transparent`, but they seemed less intuitive.
The documentation to these functions can be found in `symbol.rs`.
r? @matthewjasper
|
|
|
|
`modern_and_legacy` -> `normalize_to_macro_rules`
|
|
|
|
|
|
Rename DefKind::Method and TraitItemKind::Method
r? @eddyb, @Centril, or @matthewjasper
cc #69498 #60163
|
|
|
|
|
|
* Reorder flags to group similar ones together
* Make some flags more granular
* Compute `HAS_FREE_LOCAL_NAMES` from the other flags
* Remove `HAS_TY_CLOSURE`
* Add some more doc comments
|
|
Use a query to get parent modules
Split out from https://github.com/rust-lang/rust/pull/69015 / https://github.com/rust-lang/rust/pull/68944.
r? @michaelwoerister
|
|
|
|
|
|
|
|
Move generic arg/param validation to `create_substs_for_generic_args` to resolve various const generics issues
This changes some diagnostics, but I think they're around as helpful as the previous ones, and occur infrequently regardless.
Fixes https://github.com/rust-lang/rust/issues/68257.
Fixes https://github.com/rust-lang/rust/issues/68398.
r? @eddyb
|
|
|
|
|
|
|
|
Querify object_safety_violations.
Split from #69076
r? @Zoxc
|
|
|
|
|
|
|
|
|
|
Change const eval to just return the value
As discussed in https://github.com/rust-lang/rust/pull/68505#discussion_r370956535, the type of consts shouldn't be returned from const eval queries.
r? @eddyb
cc @nikomatsakis
|
|
inside it shouldn't be used.
|
|
|
|
|
|
Move resolve_instance to rustc_ty.
r? @Zoxc
|
|
|
|
|
|
|
|
Same idea for `Unsafety` & use new span for better diagnostics.
|
|
Improve `ty.needs_drop`
* Handle cycles in `needs_drop` correctly
* Normalize types when computing `needs_drop`
* Move queries from rustc to rustc_ty
* Avoid query in simple cases
reopens #65918
|
|
This repr-hint makes a struct/enum hide any niche within from its
surrounding type-construction context.
It is meant (at least initially) as an implementation detail for
resolving issue 68303. We will not stabilize the repr-hint unless
someone finds motivation for doing so.
(So, declaration of `no_niche` feature lives in section of file
where other internal implementation details are grouped, and
deliberately leaves out the tracking issue number.)
incorporated review feedback, and fixed post-rebase.
|
|
Co-Authored-By: varkor <github@varkor.com>
|
|
|
|
|
|
Make associated item collection a query
Before this change, every time associated items were iterated over (which rustc does *a lot* – this can probably be further optimized), there would be N+1 queries to fetch all assoc. items. Now there's just one after they've been computed once.
|
|
Rollup of 7 pull requests
Successful merges:
- #68282 (Instrument C / C++ in MemorySanitizer example)
- #68758 (Fix 59191 - ICE when macro replaces crate root with non-module item)
- #68805 (bootstrap: fix clippy warnings)
- #68810 (Remove Copy impl from OnceWith)
- #68815 (remove redundant imports (clippy::single_component_path_imports))
- #68818 (fix couple of perf related clippy warnings)
- #68819 (Suggest `split_at_mut` on multiple mutable index access)
Failed merges:
r? @ghost
|