17ac06127Sopenharmony_ci// This code exercises the surface area that we expect of Span's unstable API.
27ac06127Sopenharmony_ci// If the current toolchain is able to compile it, then proc-macro2 is able to
37ac06127Sopenharmony_ci// offer these APIs too.
47ac06127Sopenharmony_ci
57ac06127Sopenharmony_ci#![feature(proc_macro_span)]
67ac06127Sopenharmony_ci
77ac06127Sopenharmony_ciextern crate proc_macro;
87ac06127Sopenharmony_ci
97ac06127Sopenharmony_ciuse core::ops::RangeBounds;
107ac06127Sopenharmony_ciuse proc_macro::{Literal, Span};
117ac06127Sopenharmony_ci
127ac06127Sopenharmony_cipub fn join(this: &Span, other: Span) -> Option<Span> {
137ac06127Sopenharmony_ci    this.join(other)
147ac06127Sopenharmony_ci}
157ac06127Sopenharmony_ci
167ac06127Sopenharmony_cipub fn subspan<R: RangeBounds<usize>>(this: &Literal, range: R) -> Option<Span> {
177ac06127Sopenharmony_ci    this.subspan(range)
187ac06127Sopenharmony_ci}
197ac06127Sopenharmony_ci
207ac06127Sopenharmony_ci// Include in sccache cache key.
217ac06127Sopenharmony_ciconst _: Option<&str> = option_env!("RUSTC_BOOTSTRAP");
22