Skip to content

Commit 314e1e6

Browse files
committed
Replace deprecated Span::unstable method with unwrap
1 parent 73d052b commit 314e1e6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • examples/lazy-static/lazy-static/src

examples/lazy-static/lazy-static/src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ pub fn lazy_static(input: TokenStream) -> TokenStream {
6666
// | ^^^
6767
if name == "FOO" {
6868
name.span()
69-
.unstable()
69+
.unwrap()
7070
.warning("come on, pick a more creative name")
7171
.emit();
7272
}
@@ -81,7 +81,7 @@ pub fn lazy_static(input: TokenStream) -> TokenStream {
8181
if let Expr::Tuple(ref init) = init {
8282
if init.elems.is_empty() {
8383
init.span()
84-
.unstable()
84+
.unwrap()
8585
.error("I can't think of a legitimate use for lazily initializing the value `()`")
8686
.emit();
8787
return TokenStream::new();

0 commit comments

Comments
 (0)