about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEric Huss <eric@huss.org>2020-09-13 11:13:59 -0700
committerEric Huss <eric@huss.org>2020-09-13 11:13:59 -0700
commit49a61f59dfe14166742771025acee8b375717e09 (patch)
treed9671c5bc48fab0c840c3b481fb40eec1346ff78
parentc04973585df518edaa3bce547fe00793fa34d360 (diff)
downloadrust-49a61f59dfe14166742771025acee8b375717e09.tar.gz
rust-49a61f59dfe14166742771025acee8b375717e09.zip
Make const_evaluatable_unchecked lint example not depend on the architecture pointer size.
-rw-r--r--compiler/rustc_session/src/lint/builtin.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_session/src/lint/builtin.rs b/compiler/rustc_session/src/lint/builtin.rs
index 935e910c1e2..562df176b14 100644
--- a/compiler/rustc_session/src/lint/builtin.rs
+++ b/compiler/rustc_session/src/lint/builtin.rs
@@ -2525,7 +2525,7 @@ declare_lint! {
     /// ```rust
     /// const fn foo<T>() -> usize {
     ///     if std::mem::size_of::<*mut T>() < 8 { // size of *mut T does not depend on T
-    ///         std::mem::size_of::<T>()
+    ///         4
     ///     } else {
     ///         8
     ///     }