2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -Zunstable-options --generate-link-to-definition
|
2024-02-02 18:28:08 -06:00
|
|
|
|
|
|
|
#![crate_name = "foo"]
|
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has 'src/foo/jump-to-non-local-method.rs.html'
|
2024-02-02 18:35:46 -06:00
|
|
|
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/core/sync/atomic/struct.AtomicIsize.html"]' 'std::sync::atomic::AtomicIsize'
|
2024-02-02 18:28:08 -06:00
|
|
|
use std::sync::atomic::AtomicIsize;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/std/io/trait.Read.html"]' 'std::io::Read'
|
2024-02-02 18:35:46 -06:00
|
|
|
use std::io::Read;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/std/io/index.html"]' 'std::io'
|
2024-02-02 18:35:46 -06:00
|
|
|
use std::io;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/std/process/fn.exit.html"]' 'std::process::exit'
|
2024-02-02 18:35:46 -06:00
|
|
|
use std::process::exit;
|
|
|
|
use std::cmp::Ordering;
|
|
|
|
use std::marker::PhantomData;
|
2024-02-02 18:28:08 -06:00
|
|
|
|
2024-02-02 18:35:46 -06:00
|
|
|
pub fn bar2<T: Read>(readable: T) {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/std/io/trait.Read.html#tymethod.read"]' 'read'
|
2024-02-02 18:35:46 -06:00
|
|
|
let _ = readable.read(&mut []);
|
|
|
|
}
|
2024-02-02 18:28:08 -06:00
|
|
|
|
|
|
|
pub fn bar() {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/core/sync/atomic/struct.AtomicIsize.html#method.new"]' 'AtomicIsize::new'
|
2024-02-02 18:28:08 -06:00
|
|
|
let _ = AtomicIsize::new(0);
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="#48"]' 'local_private'
|
2024-02-02 18:35:46 -06:00
|
|
|
local_private();
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn extern_call() {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/std/process/fn.exit.html"]' 'exit'
|
2024-02-02 18:35:46 -06:00
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn macro_call() -> Result<(), ()> {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/core/macro.try.html"]' 'try!'
|
2024-02-02 18:35:46 -06:00
|
|
|
try!(Err(()));
|
|
|
|
Ok(())
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn variant() {
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/core/cmp/enum.Ordering.html#variant.Less"]' 'Ordering::Less'
|
2024-02-02 18:35:46 -06:00
|
|
|
let _ = Ordering::Less;
|
2024-06-21 07:03:08 -05:00
|
|
|
//@ has - '//a[@href="{{channel}}/core/marker/struct.PhantomData.html"]' 'PhantomData'
|
2024-02-02 18:35:46 -06:00
|
|
|
let _: PhantomData::<usize> = PhantomData;
|
2024-02-02 18:28:08 -06:00
|
|
|
}
|
|
|
|
|
2024-02-02 18:35:46 -06:00
|
|
|
fn local_private() {}
|