about summary refs log tree commit diff
path: root/compiler/rustc_codegen_gcc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-10-20 21:20:57 +0000
committerbors <bors@rust-lang.org>2023-10-20 21:20:57 +0000
commit249624b5043013d18c00f0401ca431c1a6baa8cd (patch)
tree1c081d1e77b79edf9043511fc7ef88ccdf0e9d67 /compiler/rustc_codegen_gcc
parent96027d945b9d8cae622a2fa4e70d8040be2964f3 (diff)
parent258af95a60d7ef05cb9531e675b4d05494676f85 (diff)
downloadrust-249624b5043013d18c00f0401ca431c1a6baa8cd.tar.gz
rust-249624b5043013d18c00f0401ca431c1a6baa8cd.zip
Auto merge of #116958 - oli-obk:coro, r=pnkfelix
rename Generator to Coroutine

implements https://github.com/rust-lang/compiler-team/issues/682

While I did an automated replacement, I went through all changes manually to avoid renaming things like "id generators", "code generator", ...

I renamed files where that was necessary due to the contents referring to the crate name itself (mir opt, codegen or debuginfo tests), or required by tidy (feature gate docs)

* [x] rename various remaining abbreviated references to generators.
* [x] rename files
* [x] rename folders
* [x] add renamed feature: `generators`, ...

r? `@ghost`
Diffstat (limited to 'compiler/rustc_codegen_gcc')
-rw-r--r--compiler/rustc_codegen_gcc/example/std_example.rs4
-rw-r--r--compiler/rustc_codegen_gcc/src/type_of.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_codegen_gcc/example/std_example.rs b/compiler/rustc_codegen_gcc/example/std_example.rs
index 18f2ddcde12..dc0aad04a78 100644
--- a/compiler/rustc_codegen_gcc/example/std_example.rs
+++ b/compiler/rustc_codegen_gcc/example/std_example.rs
@@ -1,9 +1,9 @@
-#![feature(core_intrinsics, generators, generator_trait, is_sorted)]
+#![feature(core_intrinsics, coroutines, coroutine_trait, is_sorted)]
 
 #[cfg(feature="master")]
 use std::arch::x86_64::*;
 use std::io::Write;
-use std::ops::Generator;
+use std::ops::Coroutine;
 
 extern {
     pub fn printf(format: *const i8, ...) -> i32;
diff --git a/compiler/rustc_codegen_gcc/src/type_of.rs b/compiler/rustc_codegen_gcc/src/type_of.rs
index c2eab295acd..357ce622659 100644
--- a/compiler/rustc_codegen_gcc/src/type_of.rs
+++ b/compiler/rustc_codegen_gcc/src/type_of.rs
@@ -87,7 +87,7 @@ fn uncached_gcc_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLayout
         // FIXME(eddyb) producing readable type names for trait objects can result
         // in problematically distinct types due to HRTB and subtyping (see #47638).
         // ty::Dynamic(..) |
-        ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Generator(..) | ty::Str
+        ty::Adt(..) | ty::Closure(..) | ty::Foreign(..) | ty::Coroutine(..) | ty::Str
             if !cx.sess().fewer_names() =>
         {
             let mut name = with_no_trimmed_paths!(layout.ty.to_string());
@@ -98,10 +98,10 @@ fn uncached_gcc_type<'gcc, 'tcx>(cx: &CodegenCx<'gcc, 'tcx>, layout: TyAndLayout
                     write!(&mut name, "::{}", def.variant(index).name).unwrap();
                 }
             }
-            if let (&ty::Generator(_, _, _), &Variants::Single { index }) =
+            if let (&ty::Coroutine(_, _, _), &Variants::Single { index }) =
                 (layout.ty.kind(), &layout.variants)
             {
-                write!(&mut name, "::{}", ty::GeneratorArgs::variant_name(index)).unwrap();
+                write!(&mut name, "::{}", ty::CoroutineArgs::variant_name(index)).unwrap();
             }
             Some(name)
         }