about summary refs log tree commit diff
path: root/compiler/rustc_span/src/symbol
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-02 17:02:36 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-03 07:19:41 +1100
commit94a36d2ce53f9991a529f4d8c3621f73e719de23 (patch)
treee6c83636aa18ab0a3f52a0e17c7b165228f4d21e /compiler/rustc_span/src/symbol
parentb0a07595b5ca544c499775db0987a673a96dc074 (diff)
downloadrust-94a36d2ce53f9991a529f4d8c3621f73e719de23.tar.gz
rust-94a36d2ce53f9991a529f4d8c3621f73e719de23.zip
Use `FxIndexSet` in the symbol interner.
It makes the code a little nicer.

As part of this, the interner's `Default` impl is removed and `prefill`
is used in a test instead.
Diffstat (limited to 'compiler/rustc_span/src/symbol')
-rw-r--r--compiler/rustc_span/src/symbol/tests.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_span/src/symbol/tests.rs b/compiler/rustc_span/src/symbol/tests.rs
index 0958fce5fee..4366c5a2c26 100644
--- a/compiler/rustc_span/src/symbol/tests.rs
+++ b/compiler/rustc_span/src/symbol/tests.rs
@@ -4,7 +4,7 @@ use crate::create_default_session_globals_then;
 
 #[test]
 fn interner_tests() {
-    let i = Interner::default();
+    let i = Interner::prefill(&[]);
     // first one is zero:
     assert_eq!(i.intern("dog"), Symbol::new(0));
     // re-use gets the same entry: