rust/src/test/rustdoc-ui/automatic-links.rs

23 lines
447 B
Rust
Raw Normal View History

2020-10-12 18:29:56 +02:00
#![deny(automatic_links)]
/// [http://a.com](http://a.com)
//~^ ERROR unneeded long form for URL
2020-10-12 18:29:56 +02:00
/// [http://b.com]
//~^ ERROR unneeded long form for URL
2020-10-12 18:29:56 +02:00
///
/// [http://b.com]: http://b.com
///
/// [http://c.com][http://c.com]
pub fn a() {}
/// https://somewhere.com?hello=12
//~^ ERROR won't be a link as is
pub fn c() {}
/// <https://somewhere.com>
2020-10-12 18:29:56 +02:00
/// [a](http://a.com)
/// [b]
///
/// [b]: http://b.com
pub fn everything_is_fine_here() {}