about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2025-01-25 13:47:50 -0800
committerEric Huss <eric@huss.org>2025-01-25 13:49:32 -0800
commit40e051f1bfc41f3230e1a264425cd064ea66f500 (patch)
treee4d8f5fb63f995f68f15788e299b8d6fe2d53971
parentbda56643be5e5eb26f5287d8b0af53339b0f9f70 (diff)
downloadrust-40e051f1bfc41f3230e1a264425cd064ea66f500.tar.gz
rust-40e051f1bfc41f3230e1a264425cd064ea66f500.zip
Update boring lines to sync with rustdoc
-rw-r--r--src/doc/rustc-dev-guide/src/early_late_parameters.md62
1 files changed, 31 insertions, 31 deletions
diff --git a/src/doc/rustc-dev-guide/src/early_late_parameters.md b/src/doc/rustc-dev-guide/src/early_late_parameters.md
index 6d13655294d..28026b0af27 100644
--- a/src/doc/rustc-dev-guide/src/early_late_parameters.md
+++ b/src/doc/rustc-dev-guide/src/early_late_parameters.md
@@ -126,8 +126,8 @@ In this example we call `foo`'s function item type twice, each time with a borro
 If the lifetime parameter on `foo` was late bound this would be able to compile as each caller could provide a different lifetime argument for its borrow. See the following example which demonstrates this using the `bar` function defined above:
 
 ```rust
-#fn foo<'a: 'a>(b: &'a String) -> &'a String { b }
-#fn bar<'a>(b: &'a String) -> &'a String { b }
+# fn foo<'a: 'a>(b: &'a String) -> &'a String { b }
+# fn bar<'a>(b: &'a String) -> &'a String { b }
 
 // Early bound parameters are instantiated here, however as `'a` is
 // late bound it is not provided here.
@@ -220,24 +220,24 @@ Then, for the first case, we can call each function with a single lifetime argum
 ```rust
 #![deny(late_bound_lifetime_arguments)]
 
-#fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
+# fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
 #
-#struct Foo;
+# struct Foo;
 #
-#trait Trait: Sized {
-#    fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
-#    fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
-#}
+# trait Trait: Sized {
+#     fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
+#     fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
+# }
 #
-#impl Trait for Foo {
-#    fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
-#    fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
-#}
+# impl Trait for Foo {
+#     fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
+#     fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
+# }
 #
-#impl Foo {
-#    fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
-#    fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
-#}
+# impl Foo {
+#     fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
+#     fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
+# }
 #
 // Specifying as many arguments as there are early
 // bound parameters is always a future compat warning
@@ -251,24 +251,24 @@ free_function::<'static>(&(), &());
 
 For the second case we call each function with more lifetime arguments than there are lifetime parameters (be it early or late bound) and note that method calls result in a FCW as opposed to the free/associated functions which result in a hard error:
 ```rust
-#fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
+# fn free_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
 #
-#struct Foo;
+# struct Foo;
 #
-#trait Trait: Sized {
-#    fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
-#    fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
-#}
+# trait Trait: Sized {
+#     fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ());
+#     fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ());
+# }
 #
-#impl Trait for Foo {
-#    fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
-#    fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
-#}
+# impl Trait for Foo {
+#     fn trait_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
+#     fn trait_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
+# }
 #
-#impl Foo {
-#    fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
-#    fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
-#}
+# impl Foo {
+#     fn inherent_method<'a: 'a, 'b>(self, _: &'a (), _: &'b ()) {}
+#     fn inherent_function<'a: 'a, 'b>(_: &'a (), _: &'b ()) {}
+# }
 #
 // Specifying more arguments than there are early
 // bound parameters is a future compat warning when
@@ -421,4 +421,4 @@ impl<'a> Fn<()> for FooFnItem<'a> {
     type Output = &'a String;
     /* fn call(...) -> ... { ... } */
 }
-```
\ No newline at end of file
+```