about summary refs log tree commit diff
path: root/compiler/rustc_trait_selection
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-01-29 03:12:19 +0100
committerGitHub <noreply@github.com>2025-01-29 03:12:19 +0100
commitdbb092b671a9b0d8d17447b4bca3766d8731ccef (patch)
treeece62aaa6ba33d7621611c08218923c32709e3de /compiler/rustc_trait_selection
parent42f46437bacd23d092f04271d4011902b7b44db2 (diff)
parent3026545ab50e65fcd1c888b77272032000e36147 (diff)
downloadrust-dbb092b671a9b0d8d17447b4bca3766d8731ccef.tar.gz
rust-dbb092b671a9b0d8d17447b4bca3766d8731ccef.zip
Rollup merge of #135943 - hkBst:opt_imports, r=estebank
Rename `Piece::String` to `Piece::Lit`

This renames Piece::String to Piece::Lit to avoid shadowing std::string::String and removes "pub use Piece::*;".
Diffstat (limited to 'compiler/rustc_trait_selection')
-rw-r--r--compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs b/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs
index 4e0b097db4c..3d79b0acf83 100644
--- a/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs
+++ b/compiler/rustc_trait_selection/src/error_reporting/traits/on_unimplemented.rs
@@ -799,7 +799,7 @@ impl<'tcx> OnUnimplementedFormatString {
         let mut result = Ok(());
         for token in &mut parser {
             match token {
-                Piece::String(_) => (), // Normal string, no need to check it
+                Piece::Lit(_) => (), // Normal string, no need to check it
                 Piece::NextArgument(a) => {
                     let format_spec = a.format;
                     if self.is_diagnostic_namespace_variant
@@ -950,7 +950,7 @@ impl<'tcx> OnUnimplementedFormatString {
         let item_context = (options.get(&sym::ItemContext)).unwrap_or(&empty_string);
         let constructed_message = (&mut parser)
             .map(|p| match p {
-                Piece::String(s) => s.to_owned(),
+                Piece::Lit(s) => s.to_owned(),
                 Piece::NextArgument(a) => match a.position {
                     Position::ArgumentNamed(arg) => {
                         let s = Symbol::intern(arg);