Skip to content

Commit

Permalink
Use sync::LazyLock instead of lazy::SyncLazy in attributes-info
Browse files Browse the repository at this point in the history
`lazy::SyncLazy` was renamed to `sync::LazyLock` in rust-lang/rust#98165
  • Loading branch information
Undin committed Aug 6, 2022
1 parent 8a48047 commit 42d222d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions attributes-info/rustc_span/src/symbol.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
use std::cmp::PartialEq;
use std::fmt;
use std::hash::Hash;
use std::lazy::SyncLazy;
use std::str;
use std::sync::LazyLock;

include!(concat!(env!("OUT_DIR"), "/symbol.rs"));

#[derive(Copy, Clone, Eq, PartialEq, Hash)]
pub struct Symbol(pub u32);

static INTERNER: SyncLazy<Interner> = SyncLazy::new(|| Interner::fresh());
static INTERNER: LazyLock<Interner> = LazyLock::new(|| Interner::fresh());

impl Symbol {
const fn new(n: u32) -> Self {
Expand Down

0 comments on commit 42d222d

Please sign in to comment.