Skip to content

Commit f1ce0e6

Browse files
committed
Auto merge of rust-lang#92587 - matthiaskrgr:rollup-qnwa8qx, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - rust-lang#92092 (Drop guards in slice sorting derive src pointers from &mut T, which is invalidated by interior mutation in comparison) - rust-lang#92388 (Fix a minor mistake in `String::try_reserve_exact` examples) - rust-lang#92442 (Add negative `impl` for `Ord`, `PartialOrd` on `LocalDefId`) - rust-lang#92483 (Stabilize `result_cloned` and `result_copied`) - rust-lang#92574 (Add RISC-V detection macro and more architecture instructions) - rust-lang#92575 (ast: Always keep a `NodeId` in `ast::Crate`) - rust-lang#92583 (:arrow_up: rust-analyzer) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 181e915 + 439a125 commit f1ce0e6

File tree

20 files changed

+77
-54
lines changed

20 files changed

+77
-54
lines changed

compiler/rustc_ast/src/ast.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -510,8 +510,10 @@ pub struct Crate {
510510
pub attrs: Vec<Attribute>,
511511
pub items: Vec<P<Item>>,
512512
pub span: Span,
513-
// Placeholder ID if the crate node is a macro placeholder.
514-
pub is_placeholder: Option<NodeId>,
513+
/// Must be equal to `CRATE_NODE_ID` after the crate root is expanded, but may hold
514+
/// expansion placeholders or an unassigned value (`DUMMY_NODE_ID`) before that.
515+
pub id: NodeId,
516+
pub is_placeholder: bool,
515517
}
516518

517519
/// Possible values inside of compile-time attribute lists.

compiler/rustc_ast/src/mut_visit.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1109,7 +1109,8 @@ pub fn noop_visit_fn_header<T: MutVisitor>(header: &mut FnHeader, vis: &mut T) {
11091109
}
11101110

11111111
pub fn noop_visit_crate<T: MutVisitor>(krate: &mut Crate, vis: &mut T) {
1112-
let Crate { attrs, items, span, is_placeholder: _ } = krate;
1112+
let Crate { attrs, items, span, id, is_placeholder: _ } = krate;
1113+
vis.visit_id(id);
11131114
visit_attrs(attrs, vis);
11141115
items.flat_map_in_place(|item| vis.flat_map_item(item));
11151116
vis.visit_span(span);
@@ -1554,6 +1555,7 @@ impl DummyAstNode for Crate {
15541555
attrs: Default::default(),
15551556
items: Default::default(),
15561557
span: Default::default(),
1558+
id: DUMMY_NODE_ID,
15571559
is_placeholder: Default::default(),
15581560
}
15591561
}

compiler/rustc_expand/src/expand.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@ impl<'a, 'b> MacroExpander<'a, 'b> {
377377
dir_path,
378378
});
379379
let krate = self.fully_expand_fragment(AstFragment::Crate(krate)).make_crate();
380+
assert_eq!(krate.id, ast::CRATE_NODE_ID);
380381
self.cx.trace_macros_diag();
381382
krate
382383
}
@@ -1169,7 +1170,8 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
11691170
attrs: Vec::new(),
11701171
items: Vec::new(),
11711172
span,
1172-
is_placeholder: None,
1173+
id: self.cx.resolver.next_node_id(),
1174+
is_placeholder: false,
11731175
};
11741176
}
11751177
};
@@ -1180,7 +1182,7 @@ impl<'a, 'b> MutVisitor for InvocationCollector<'a, 'b> {
11801182
.make_crate();
11811183
}
11821184

1183-
noop_visit_crate(&mut krate, self);
1185+
assign_id!(self, &mut krate.id, || noop_visit_crate(&mut krate, self));
11841186
krate
11851187
})
11861188
}

compiler/rustc_expand/src/placeholders.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ pub fn placeholder(
5050
attrs: Default::default(),
5151
items: Default::default(),
5252
span,
53-
is_placeholder: Some(id),
53+
id,
54+
is_placeholder: true,
5455
}),
5556
AstFragmentKind::Expr => AstFragment::Expr(expr_placeholder()),
5657
AstFragmentKind::OptExpr => AstFragment::OptExpr(Some(expr_placeholder())),
@@ -362,8 +363,8 @@ impl MutVisitor for PlaceholderExpander {
362363
}
363364

364365
fn visit_crate(&mut self, krate: &mut ast::Crate) {
365-
if let Some(id) = krate.is_placeholder {
366-
*krate = self.remove(id).make_crate();
366+
if krate.is_placeholder {
367+
*krate = self.remove(krate.id).make_crate();
367368
} else {
368369
noop_visit_crate(krate, self)
369370
}

compiler/rustc_interface/src/passes.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use crate::proc_macro_decls;
33
use crate::util;
44

55
use rustc_ast::mut_visit::MutVisitor;
6-
use rustc_ast::{self as ast, visit};
6+
use rustc_ast::{self as ast, visit, DUMMY_NODE_ID};
77
use rustc_borrowck as mir_borrowck;
88
use rustc_codegen_ssa::back::link::emit_metadata;
99
use rustc_codegen_ssa::traits::CodegenBackend;
@@ -323,7 +323,7 @@ pub fn configure_and_expand(
323323

324324
let crate_attrs = krate.attrs.clone();
325325
let extern_mod_loaded = |ident: Ident, attrs, items, span| {
326-
let krate = ast::Crate { attrs, items, span, is_placeholder: None };
326+
let krate = ast::Crate { attrs, items, span, id: DUMMY_NODE_ID, is_placeholder: false };
327327
pre_expansion_lint(sess, lint_store, &krate, &crate_attrs, ident.name.as_str());
328328
(krate.attrs, krate.items)
329329
};

compiler/rustc_parse/src/parser/item.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ impl<'a> Parser<'a> {
2727
/// Parses a source module as a crate. This is the main entry point for the parser.
2828
pub fn parse_crate_mod(&mut self) -> PResult<'a, ast::Crate> {
2929
let (attrs, items, span) = self.parse_mod(&token::Eof)?;
30-
Ok(ast::Crate { attrs, items, span, is_placeholder: None })
30+
Ok(ast::Crate { attrs, items, span, id: DUMMY_NODE_ID, is_placeholder: false })
3131
}
3232

3333
/// Parses a `mod <foo> { ... }` or `mod <foo>;` item.

compiler/rustc_resolve/src/build_reduced_graph.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1512,8 +1512,8 @@ impl<'a, 'b> Visitor<'b> for BuildReducedGraphVisitor<'a, 'b> {
15121512
}
15131513

15141514
fn visit_crate(&mut self, krate: &'b ast::Crate) {
1515-
if let Some(id) = krate.is_placeholder {
1516-
self.visit_invoc_in_module(id);
1515+
if krate.is_placeholder {
1516+
self.visit_invoc_in_module(krate.id);
15171517
} else {
15181518
visit::walk_crate(self, krate);
15191519
self.contains_macro_use(&krate.attrs);

compiler/rustc_resolve/src/def_collector.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,8 +344,8 @@ impl<'a, 'b> visit::Visitor<'a> for DefCollector<'a, 'b> {
344344
}
345345

346346
fn visit_crate(&mut self, krate: &'a Crate) {
347-
if let Some(id) = krate.is_placeholder {
348-
self.visit_macro_invoc(id)
347+
if krate.is_placeholder {
348+
self.visit_macro_invoc(krate.id)
349349
} else {
350350
visit::walk_crate(self, krate)
351351
}

compiler/rustc_resolve/src/lib.rs

+3-4
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use smallvec::{smallvec, SmallVec};
6868
use std::cell::{Cell, RefCell};
6969
use std::collections::{BTreeMap, BTreeSet};
7070
use std::ops::ControlFlow;
71-
use std::{cmp, fmt, iter, ptr};
71+
use std::{cmp, fmt, iter, mem, ptr};
7272
use tracing::debug;
7373

7474
use diagnostics::{extend_span_to_previous_binding, find_span_of_binding_until_next_binding};
@@ -1394,7 +1394,7 @@ impl<'a> Resolver<'a> {
13941394
.chain(features.declared_lang_features.iter().map(|(feat, ..)| *feat))
13951395
.collect(),
13961396
lint_buffer: LintBuffer::default(),
1397-
next_node_id: NodeId::from_u32(1),
1397+
next_node_id: CRATE_NODE_ID,
13981398
node_id_to_def_id,
13991399
def_id_to_node_id,
14001400
placeholder_field_indices: Default::default(),
@@ -1430,8 +1430,7 @@ impl<'a> Resolver<'a> {
14301430
pub fn next_node_id(&mut self) -> NodeId {
14311431
let next =
14321432
self.next_node_id.as_u32().checked_add(1).expect("input too large; ran out of NodeIds");
1433-
self.next_node_id = ast::NodeId::from_u32(next);
1434-
self.next_node_id
1433+
mem::replace(&mut self.next_node_id, ast::NodeId::from_u32(next))
14351434
}
14361435

14371436
pub fn lint_buffer(&mut self) -> &mut LintBuffer {

compiler/rustc_span/src/def_id.rs

+11-5
Original file line numberDiff line numberDiff line change
@@ -316,17 +316,23 @@ impl fmt::Debug for DefId {
316316

317317
rustc_data_structures::define_id_collections!(DefIdMap, DefIdSet, DefId);
318318

319-
/// A LocalDefId is equivalent to a DefId with `krate == LOCAL_CRATE`. Since
319+
/// A `LocalDefId` is equivalent to a `DefId` with `krate == LOCAL_CRATE`. Since
320320
/// we encode this information in the type, we can ensure at compile time that
321-
/// no DefIds from upstream crates get thrown into the mix. There are quite a
322-
/// few cases where we know that only DefIds from the local crate are expected
323-
/// and a DefId from a different crate would signify a bug somewhere. This
324-
/// is when LocalDefId comes in handy.
321+
/// no `DefId`s from upstream crates get thrown into the mix. There are quite a
322+
/// few cases where we know that only `DefId`s from the local crate are expected;
323+
/// a `DefId` from a different crate would signify a bug somewhere. This
324+
/// is when `LocalDefId` comes in handy.
325325
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
326326
pub struct LocalDefId {
327327
pub local_def_index: DefIndex,
328328
}
329329

330+
// To ensure correctness of incremental compilation,
331+
// `LocalDefId` must not implement `Ord` or `PartialOrd`.
332+
// See https://github.com/rust-lang/rust/issues/90317.
333+
impl !Ord for LocalDefId {}
334+
impl !PartialOrd for LocalDefId {}
335+
330336
pub const CRATE_DEF_ID: LocalDefId = LocalDefId { local_def_index: CRATE_DEF_INDEX };
331337

332338
impl Idx for LocalDefId {

library/alloc/src/slice.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ where
892892
// performance than with the 2nd method.
893893
//
894894
// All methods were benchmarked, and the 3rd showed best results. So we chose that one.
895-
let mut tmp = mem::ManuallyDrop::new(ptr::read(&v[0]));
895+
let tmp = mem::ManuallyDrop::new(ptr::read(&v[0]));
896896

897897
// Intermediate state of the insertion process is always tracked by `hole`, which
898898
// serves two purposes:
@@ -904,7 +904,7 @@ where
904904
// If `is_less` panics at any point during the process, `hole` will get dropped and
905905
// fill the hole in `v` with `tmp`, thus ensuring that `v` still holds every object it
906906
// initially held exactly once.
907-
let mut hole = InsertionHole { src: &mut *tmp, dest: &mut v[1] };
907+
let mut hole = InsertionHole { src: &*tmp, dest: &mut v[1] };
908908
ptr::copy_nonoverlapping(&v[1], &mut v[0], 1);
909909

910910
for i in 2..v.len() {
@@ -920,7 +920,7 @@ where
920920

921921
// When dropped, copies from `src` into `dest`.
922922
struct InsertionHole<T> {
923-
src: *mut T,
923+
src: *const T,
924924
dest: *mut T,
925925
}
926926

library/alloc/src/string.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1062,7 +1062,7 @@ impl String {
10621062
/// let mut output = String::new();
10631063
///
10641064
/// // Pre-reserve the memory, exiting if we can't
1065-
/// output.try_reserve(data.len())?;
1065+
/// output.try_reserve_exact(data.len())?;
10661066
///
10671067
/// // Now we know this can't OOM in the middle of our complex work
10681068
/// output.push_str(data);

library/core/src/hint.rs

+15-5
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,21 @@ pub fn spin_loop() {
123123
}
124124
}
125125

126+
// RISC-V platform spin loop hint implementation
127+
{
128+
// RISC-V RV32 and RV64 share the same PAUSE instruction, but they are located in different
129+
// modules in `core::arch`.
130+
// In this case, here we call `pause` function in each core arch module.
131+
#[cfg(target_arch = "riscv32")]
132+
{
133+
crate::arch::riscv32::pause();
134+
}
135+
#[cfg(target_arch = "riscv64")]
136+
{
137+
crate::arch::riscv64::pause();
138+
}
139+
}
140+
126141
#[cfg(any(target_arch = "aarch64", all(target_arch = "arm", target_feature = "v6")))]
127142
{
128143
#[cfg(target_arch = "aarch64")]
@@ -137,11 +152,6 @@ pub fn spin_loop() {
137152
unsafe { crate::arch::arm::__yield() };
138153
}
139154
}
140-
141-
#[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))]
142-
{
143-
crate::arch::riscv::pause();
144-
}
145155
}
146156

147157
/// An identity function that *__hints__* to the compiler to be maximally pessimistic about what

library/core/src/result.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1504,14 +1504,14 @@ impl<T, E> Result<&T, E> {
15041504
/// # Examples
15051505
///
15061506
/// ```
1507-
/// #![feature(result_copied)]
15081507
/// let val = 12;
15091508
/// let x: Result<&i32, i32> = Ok(&val);
15101509
/// assert_eq!(x, Ok(&12));
15111510
/// let copied = x.copied();
15121511
/// assert_eq!(copied, Ok(12));
15131512
/// ```
1514-
#[unstable(feature = "result_copied", reason = "newly added", issue = "63168")]
1513+
#[inline]
1514+
#[stable(feature = "result_copied", since = "1.59.0")]
15151515
pub fn copied(self) -> Result<T, E>
15161516
where
15171517
T: Copy,
@@ -1525,14 +1525,14 @@ impl<T, E> Result<&T, E> {
15251525
/// # Examples
15261526
///
15271527
/// ```
1528-
/// #![feature(result_cloned)]
15291528
/// let val = 12;
15301529
/// let x: Result<&i32, i32> = Ok(&val);
15311530
/// assert_eq!(x, Ok(&12));
15321531
/// let cloned = x.cloned();
15331532
/// assert_eq!(cloned, Ok(12));
15341533
/// ```
1535-
#[unstable(feature = "result_cloned", reason = "newly added", issue = "63168")]
1534+
#[inline]
1535+
#[stable(feature = "result_cloned", since = "1.59.0")]
15361536
pub fn cloned(self) -> Result<T, E>
15371537
where
15381538
T: Clone,
@@ -1548,14 +1548,14 @@ impl<T, E> Result<&mut T, E> {
15481548
/// # Examples
15491549
///
15501550
/// ```
1551-
/// #![feature(result_copied)]
15521551
/// let mut val = 12;
15531552
/// let x: Result<&mut i32, i32> = Ok(&mut val);
15541553
/// assert_eq!(x, Ok(&mut 12));
15551554
/// let copied = x.copied();
15561555
/// assert_eq!(copied, Ok(12));
15571556
/// ```
1558-
#[unstable(feature = "result_copied", reason = "newly added", issue = "63168")]
1557+
#[inline]
1558+
#[stable(feature = "result_copied", since = "1.59.0")]
15591559
pub fn copied(self) -> Result<T, E>
15601560
where
15611561
T: Copy,
@@ -1569,14 +1569,14 @@ impl<T, E> Result<&mut T, E> {
15691569
/// # Examples
15701570
///
15711571
/// ```
1572-
/// #![feature(result_cloned)]
15731572
/// let mut val = 12;
15741573
/// let x: Result<&mut i32, i32> = Ok(&mut val);
15751574
/// assert_eq!(x, Ok(&mut 12));
15761575
/// let cloned = x.cloned();
15771576
/// assert_eq!(cloned, Ok(12));
15781577
/// ```
1579-
#[unstable(feature = "result_cloned", reason = "newly added", issue = "63168")]
1578+
#[inline]
1579+
#[stable(feature = "result_cloned", since = "1.59.0")]
15801580
pub fn cloned(self) -> Result<T, E>
15811581
where
15821582
T: Clone,

library/core/src/slice/sort.rs

+9-9
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::ptr;
1212

1313
/// When dropped, copies from `src` into `dest`.
1414
struct CopyOnDrop<T> {
15-
src: *mut T,
15+
src: *const T,
1616
dest: *mut T,
1717
}
1818

@@ -54,9 +54,9 @@ where
5454
// Read the first element into a stack-allocated variable. If a following comparison
5555
// operation panics, `hole` will get dropped and automatically write the element back
5656
// into the slice.
57-
let mut tmp = mem::ManuallyDrop::new(ptr::read(v.get_unchecked(0)));
57+
let tmp = mem::ManuallyDrop::new(ptr::read(v.get_unchecked(0)));
5858
let v = v.as_mut_ptr();
59-
let mut hole = CopyOnDrop { src: &mut *tmp, dest: v.add(1) };
59+
let mut hole = CopyOnDrop { src: &*tmp, dest: v.add(1) };
6060
ptr::copy_nonoverlapping(v.add(1), v.add(0), 1);
6161

6262
for i in 2..len {
@@ -100,9 +100,9 @@ where
100100
// Read the last element into a stack-allocated variable. If a following comparison
101101
// operation panics, `hole` will get dropped and automatically write the element back
102102
// into the slice.
103-
let mut tmp = mem::ManuallyDrop::new(ptr::read(v.get_unchecked(len - 1)));
103+
let tmp = mem::ManuallyDrop::new(ptr::read(v.get_unchecked(len - 1)));
104104
let v = v.as_mut_ptr();
105-
let mut hole = CopyOnDrop { src: &mut *tmp, dest: v.add(len - 2) };
105+
let mut hole = CopyOnDrop { src: &*tmp, dest: v.add(len - 2) };
106106
ptr::copy_nonoverlapping(v.add(len - 2), v.add(len - 1), 1);
107107

108108
for i in (0..len - 2).rev() {
@@ -498,8 +498,8 @@ where
498498
// operation panics, the pivot will be automatically written back into the slice.
499499

500500
// SAFETY: `pivot` is a reference to the first element of `v`, so `ptr::read` is safe.
501-
let mut tmp = mem::ManuallyDrop::new(unsafe { ptr::read(pivot) });
502-
let _pivot_guard = CopyOnDrop { src: &mut *tmp, dest: pivot };
501+
let tmp = mem::ManuallyDrop::new(unsafe { ptr::read(pivot) });
502+
let _pivot_guard = CopyOnDrop { src: &*tmp, dest: pivot };
503503
let pivot = &*tmp;
504504

505505
// Find the first pair of out-of-order elements.
@@ -551,8 +551,8 @@ where
551551
// Read the pivot into a stack-allocated variable for efficiency. If a following comparison
552552
// operation panics, the pivot will be automatically written back into the slice.
553553
// SAFETY: The pointer here is valid because it is obtained from a reference to a slice.
554-
let mut tmp = mem::ManuallyDrop::new(unsafe { ptr::read(pivot) });
555-
let _pivot_guard = CopyOnDrop { src: &mut *tmp, dest: pivot };
554+
let tmp = mem::ManuallyDrop::new(unsafe { ptr::read(pivot) });
555+
let _pivot_guard = CopyOnDrop { src: &*tmp, dest: pivot };
556556
let pivot = &*tmp;
557557

558558
// Now partition the slice.

library/std/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,7 @@ pub use std_detect::*;
556556
pub use std_detect::{
557557
is_aarch64_feature_detected, is_arm_feature_detected, is_mips64_feature_detected,
558558
is_mips_feature_detected, is_powerpc64_feature_detected, is_powerpc_feature_detected,
559+
is_riscv_feature_detected,
559560
};
560561

561562
// Re-export macros defined in libcore.
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"attrs":[{"kind":{"variant":"Normal","fields":[{"path":{"span":{"lo":0,"hi":0},"segments":[{"ident":{"name":"crate_type","span":{"lo":0,"hi":0}},"id":0,"args":null}],"tokens":null},"args":{"variant":"Eq","fields":[{"lo":0,"hi":0},{"kind":{"variant":"Interpolated","fields":[{"variant":"NtExpr","fields":[{"id":0,"kind":{"variant":"Lit","fields":[{"token":{"kind":"Str","symbol":"lib","suffix":null},"kind":{"variant":"Str","fields":["lib","Cooked"]},"span":{"lo":0,"hi":0}}]},"span":{"lo":0,"hi":0},"attrs":{"0":null},"tokens":{"0":[[{"variant":"Token","fields":[{"kind":{"variant":"Literal","fields":[{"kind":"Str","symbol":"lib","suffix":null}]},"span":{"lo":0,"hi":0}}]},"Alone"]]}}]}]},"span":{"lo":0,"hi":0}}]},"tokens":null},{"0":[[{"variant":"Token","fields":[{"kind":"Pound","span":{"lo":0,"hi":0}}]},"Joint"],[{"variant":"Token","fields":[{"kind":"Not","span":{"lo":0,"hi":0}}]},"Alone"],[{"variant":"Delimited","fields":[{"open":{"lo":0,"hi":0},"close":{"lo":0,"hi":0}},"Bracket",{"0":[[{"variant":"Token","fields":[{"kind":{"variant":"Ident","fields":["crate_type",false]},"span":{"lo":0,"hi":0}}]},"Alone"],[{"variant":"Token","fields":[{"kind":"Eq","span":{"lo":0,"hi":0}}]},"Alone"],[{"variant":"Token","fields":[{"kind":{"variant":"Literal","fields":[{"kind":"Str","symbol":"lib","suffix":null}]},"span":{"lo":0,"hi":0}}]},"Alone"]]}]},"Alone"]]}]},"id":null,"style":"Inner","span":{"lo":0,"hi":0}}],"items":[{"attrs":[],"id":0,"span":{"lo":0,"hi":0},"vis":{"kind":"Inherited","span":{"lo":0,"hi":0},"tokens":null},"ident":{"name":"core","span":{"lo":0,"hi":0}},"kind":{"variant":"ExternCrate","fields":[null]},"tokens":null}],"span":{"lo":0,"hi":0},"is_placeholder":null}
1+
{"attrs":[{"kind":{"variant":"Normal","fields":[{"path":{"span":{"lo":0,"hi":0},"segments":[{"ident":{"name":"crate_type","span":{"lo":0,"hi":0}},"id":0,"args":null}],"tokens":null},"args":{"variant":"Eq","fields":[{"lo":0,"hi":0},{"kind":{"variant":"Interpolated","fields":[{"variant":"NtExpr","fields":[{"id":0,"kind":{"variant":"Lit","fields":[{"token":{"kind":"Str","symbol":"lib","suffix":null},"kind":{"variant":"Str","fields":["lib","Cooked"]},"span":{"lo":0,"hi":0}}]},"span":{"lo":0,"hi":0},"attrs":{"0":null},"tokens":{"0":[[{"variant":"Token","fields":[{"kind":{"variant":"Literal","fields":[{"kind":"Str","symbol":"lib","suffix":null}]},"span":{"lo":0,"hi":0}}]},"Alone"]]}}]}]},"span":{"lo":0,"hi":0}}]},"tokens":null},{"0":[[{"variant":"Token","fields":[{"kind":"Pound","span":{"lo":0,"hi":0}}]},"Joint"],[{"variant":"Token","fields":[{"kind":"Not","span":{"lo":0,"hi":0}}]},"Alone"],[{"variant":"Delimited","fields":[{"open":{"lo":0,"hi":0},"close":{"lo":0,"hi":0}},"Bracket",{"0":[[{"variant":"Token","fields":[{"kind":{"variant":"Ident","fields":["crate_type",false]},"span":{"lo":0,"hi":0}}]},"Alone"],[{"variant":"Token","fields":[{"kind":"Eq","span":{"lo":0,"hi":0}}]},"Alone"],[{"variant":"Token","fields":[{"kind":{"variant":"Literal","fields":[{"kind":"Str","symbol":"lib","suffix":null}]},"span":{"lo":0,"hi":0}}]},"Alone"]]}]},"Alone"]]}]},"id":null,"style":"Inner","span":{"lo":0,"hi":0}}],"items":[{"attrs":[],"id":0,"span":{"lo":0,"hi":0},"vis":{"kind":"Inherited","span":{"lo":0,"hi":0},"tokens":null},"ident":{"name":"core","span":{"lo":0,"hi":0}},"kind":{"variant":"ExternCrate","fields":[null]},"tokens":null}],"span":{"lo":0,"hi":0},"id":0,"is_placeholder":false}

0 commit comments

Comments
 (0)