1
Fork 0

Rollup merge of #102049 - fee1-dead-contrib:derive_const, r=oli-obk

Add the `#[derive_const]` attribute

Closes #102371. This is a minimal patchset for the attribute to work. There are no restrictions on what traits this attribute applies to.

r? `````@oli-obk`````
This commit is contained in:
Dylan DPC 2022-11-12 12:02:50 +05:30 committed by GitHub
commit 4b0b89827d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
30 changed files with 163 additions and 30 deletions

View file

@ -356,7 +356,7 @@ impl<'a> ResolverExpand for Resolver<'a> {
has_derive_copy: false,
});
let parent_scope = self.invocation_parent_scopes[&expn_id];
for (i, (path, _, opt_ext)) in entry.resolutions.iter_mut().enumerate() {
for (i, (path, _, opt_ext, _)) in entry.resolutions.iter_mut().enumerate() {
if opt_ext.is_none() {
*opt_ext = Some(
match self.resolve_macro_path(