You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
815 B
23 lines
815 B
// Copyright 2023 The Chromium Authors
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// The explicit `extern crate` will catch if a GN target specifies conflicting
|
|
// dependencies.
|
|
//
|
|
// When libraries are included implicitly from the command line, rustc seems to
|
|
// silently pick the first one that matches. On the other hand with an explicit
|
|
// "extern crate" directive, which tells rustc to link a dependency no matter
|
|
// what, rustc will see the conflict.
|
|
extern crate transitive_dep;
|
|
|
|
pub use foo_dependency::say_foo;
|
|
pub use foo_dependency::say_foo_directly;
|
|
pub use transitive_dep::say_something;
|
|
|
|
#[no_mangle]
|
|
pub extern "C" fn print_foo_bar() {
|
|
println!("{}", foo_dependency::say_foo());
|
|
println!("{}", transitive_dep::say_something());
|
|
}
|