]>
git.proxmox.com Git - rustc.git/blob - src/tools/clippy/tests/matches.rs
1 #![feature(rustc_private)]
3 extern crate clippy_lints
;
5 use std
::collections
::Bound
;
8 fn test_overlapping() {
9 use clippy_lints
::matches
::overlapping
;
10 use syntax
::codemap
::DUMMY_SP
;
13 clippy_lints
::matches
::SpannedRange
{
19 assert_eq
!(None
, overlapping
::<u8>(&[]));
20 assert_eq
!(None
, overlapping(&[sp(1, Bound
::Included(4))]));
21 assert_eq
!(None
, overlapping(&[sp(1, Bound
::Included(4)), sp(5, Bound
::Included(6))]));
25 sp(1, Bound
::Included(4)),
26 sp(5, Bound
::Included(6)),
27 sp(10, Bound
::Included(11))
31 Some((&sp(1, Bound
::Included(4)), &sp(3, Bound
::Included(6)))),
32 overlapping(&[sp(1, Bound
::Included(4)), sp(3, Bound
::Included(6))])
35 Some((&sp(5, Bound
::Included(6)), &sp(6, Bound
::Included(11)))),
37 sp(1, Bound
::Included(4)),
38 sp(5, Bound
::Included(6)),
39 sp(6, Bound
::Included(11))