@@ -1107,17 +1107,19 @@ pub(crate) mod builtin {
11071107 ///
11081108 /// If the named environment variable is present at compile time, this will
11091109 /// expand into an expression of type `Option<&'static str>` whose value is
1110- /// `Some` of the value of the environment variable. If the environment
1111- /// variable is not present, then this will expand to `None`. See
1112- /// [`Option<T>`][Option] for more information on this type. Use
1113- /// [`std::env::var`] instead if you want to read the value at runtime.
1110+ /// `Some` of the value of the environment variable (a compilation error
1111+ /// will be emitted if the environment variable is not a valid Unicode
1112+ /// string). If the environment variable is not present, then this will
1113+ /// expand to `None`. See [`Option<T>`][Option] for more information on this
1114+ /// type. Use [`std::env::var`] instead if you want to read the value at
1115+ /// runtime.
11141116 ///
11151117 /// [`std::env::var`]: ../std/env/fn.var.html
11161118 ///
1117- /// A compile time error is never emitted when using this macro regardless
1118- /// of whether the environment variable is present or not.
1119- /// To emit a compile error if the environment variable is not present,
1120- /// use the [`env!`] macro instead.
1119+ /// A compile time error is only emitted when using this macro if the
1120+ /// environment variable exists and is not a valid Unicode string. To also
1121+ /// emit a compile error if the environment variable is not present, use the
1122+ /// [`env!`] macro instead.
11211123 ///
11221124 /// # Examples
11231125 ///
0 commit comments