1// This code exercises the surface area that we expect of Span's unstable API. 2// If the current toolchain is able to compile it, then proc-macro2 is able to 3// offer these APIs too. 4 5#![feature(proc_macro_span)] 6 7extern crate proc_macro; 8 9use core::ops::RangeBounds; 10use proc_macro::{Literal, Span}; 11 12pub fn join(this: &Span, other: Span) -> Option<Span> { 13 this.join(other) 14} 15 16pub fn subspan<R: RangeBounds<usize>>(this: &Literal, range: R) -> Option<Span> { 17 this.subspan(range) 18} 19 20// Include in sccache cache key. 21const _: Option<&str> = option_env!("RUSTC_BOOTSTRAP"); 22