| /third_party/rust/rust/compiler/rustc_middle/src/ty/ |
| D | trait_def.rs | 23 /// sugar. This is a temporary thing -- eventually any trait will 30 /// that all its associated items have defaults that cannot be overridden, 38 /// In the future all traits should be coinductive, but we need a better 57 /// This is enabled for all traits except ones marked with 61 /// Whether a trait is fully built-in, and any implementation is disallowed. 62 /// This only applies to built-in traits, and is marked via 78 /// Specializing on this trait is allowed because all of the impls of this 88 /// Impls indexed by their simplified self type, for fast lookup. 93 pub fn blanket_impls(&self) -> &[DefId] { in blanket_impls() 97 pub fn non_blanket_impls(&self) -> &FxIndexMap<SimplifiedType, Vec<DefId>> { in non_blanket_impls() [all …]
|
| /third_party/rust/rust/compiler/rustc_middle/src/traits/ |
| D | specialization_graph.rs | 10 /// A per-trait graph of impls in specialization order. At the moment, this 11 /// graph forms a tree rooted with the trait itself, with all other nodes 12 /// representing impls, and parent-child relationships representing 17 /// - Construction. This implicitly checks for overlapping impls (i.e., impls 18 /// that overlap but where neither specializes the other -- an artifact of the 21 /// - Parent extraction. In particular, the graph can give you the *immediate* 27 /// All impls have a parent; the "root" impls have as their parent the `def_id` 31 /// The "root" impls are found by looking up the trait's def_id. 39 pub fn new() -> Graph { in new() 45 pub fn parent(&self, child: DefId) -> DefId { in parent() [all …]
|
| /third_party/rust/rust/src/doc/unstable-book/src/language-features/ |
| D | negative-impls.md | 5 [#68318]: https://github.com/rust-lang/rust/issues/68318 7 ---- 9 With the feature gate `negative_impls`, you can write negative impls as well as positive ones: 17 Negative impls indicate a semver guarantee that the given trait will not be implemented for the giv… 19 Negative impls have the following characteristics: 23 * They cannot "overlap" with any positive impls. 27 It is a breaking change to remove a negative impl. Negative impls are a commitment not to implement… 31 Negative impls must obey the same orphan rules as a positive impl. This implies you cannot add a ne… 33 …impls cannot overlap with positive impls, again using the same "overlap" check that we ordinarily … 38 auto-trait serves two purposes: [all …]
|
| /third_party/rust/rust/src/tools/rust-analyzer/crates/hir-ty/src/ |
| D | method_resolution.rs | 3 //! [rustc guide](https://rust-lang.github.io/rustc-guide/method-lookup.html) 34 /// This is used as a key for indexing impls. 37 // These are lang item impls: 44 // These can have user-defined impls: 48 // These only exist for trait impls 56 /// types can have inherent impls: if we have some `struct S`, we can have 59 pub fn for_inherent_impl(ty: &Ty) -> Option<TyFingerprint> { in for_inherent_impl() 76 pub fn for_trait_impl(ty: &Ty) -> Option<TyFingerprint> { in for_trait_impl() 134 /// Trait impls defined or available in some crate. 142 pub(crate) fn trait_impls_in_crate_query(db: &dyn HirDatabase, krate: CrateId) -> Arc<Self> { in trait_impls_in_crate_query() [all …]
|
| /third_party/rust/rust/tests/rustdoc-ui/issues/ |
| D | issue-91713.stdout | 2 check_doc_test_visibility - run various visibility-related lints on doctests 3 strip-hidden - strips all `#[doc(hidden)]` items from the output 4 …strip-private - strips all private items from a crate which cannot be seen externally, implies str… 5 strip-priv-imports - strips all private import statements (`use`, `extern crate`) from a crate 6 propagate-doc-cfg - propagates `#[doc(cfg(...))]` to child items 7 collect-intra-doc-links - resolves intra-doc links 8 collect-trait-impls - retrieves trait impls for items in the crate 9 calculate-doc-coverage - counts the number of items with and without documentation 10 run-lints - runs some of rustdoc's lints 13 collect-trait-impls [all …]
|
| /third_party/rust/rust/src/librustdoc/passes/ |
| D | collect_trait_impls.rs | 1 //! Collects trait impls for each item in the crate. For example, if a crate 16 name: "collect-trait-impls", 18 description: "retrieves trait impls for items in the crate", 21 pub(crate) fn collect_trait_impls(mut krate: Crate, cx: &mut DocContext<'_>) -> Crate { in collect_trait_impls() 30 let mut synth = SyntheticImplCollector { cx, impls: Vec::new() }; in collect_trait_impls() 32 synth.impls in collect_trait_impls() 47 // External trait impls. in collect_trait_impls() 57 // Local trait impls. in collect_trait_impls() 84 // Try to inline primitive impls from other crates. in collect_trait_impls() 94 for def_id in prim.impls(tcx).filter(|def_id| { in collect_trait_impls() [all …]
|
| /third_party/openssl/crypto/property/ |
| D | property.c | 2 * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. 3 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 59 STACK_OF(IMPLEMENTATION) *impls; 82 /* Count of the query cache entries for all algs */ 85 /* Flag: 1 if query cache entries for all algs need flushing */ 117 ossl_property_free(globp->list); in ossl_ctx_global_properties_free() 145 return globp != NULL ? &globp->list : NULL; in ossl_ctx_global_properties() 155 return globp != NULL && globp->no_mirrored ? 1 : 0; in ossl_global_properties_no_mirrored() 165 globp->no_mirrored = 1; in ossl_global_properties_stop_mirroring() 171 return (*method->up_ref)(method->method); in ossl_method_up_ref() [all …]
|
| /third_party/rust/crates/cxx/syntax/ |
| D | types.rs | 16 pub all: OrderedSet<&'a Type>, field 24 pub impls: OrderedMap<ImplKey<'a>, Option<&'a Impl>>, field 31 pub fn collect(cx: &mut Errors, apis: &'a [Api]) -> Self { in collect() 32 let mut all = OrderedSet::new(); in collect() localVariable 39 let mut impls = OrderedMap::new(); in collect() localVariable 44 fn visit<'a>(all: &mut OrderedSet<&'a Type>, ty: &'a Type) { in collect() 54 CollectTypes(all).visit_type(ty); in collect() 69 // All other cases of duplicate identifiers are reported as an error. in collect() 86 visit(&mut all, &field.ty); in collect() 93 all.insert(repr_type); in collect() [all …]
|
| /third_party/rust/rust/compiler/rustc_trait_selection/src/traits/ |
| D | coherence.rs | 1 //! See Rustc Dev Guide chapters on [trait-resolution] and [trait-specialization] for more info on 4 //! [trait-resolution]: https://rustc-dev-guide.rust-lang.org/traits/resolution.html 5 //! [trait-specialization]: https://rustc-dev-guide.rust-lang.org/traits/specialization.html 62 see rust-lang/rust#56105 for details", in add_placeholder_note() 73 fn is_yes(self) -> bool { in is_yes() 81 /// If there are types that satisfy both impls, returns `Some` 82 /// with a suitably-freshened `ImplHeader` with those types 91 ) -> Option<OverlapResult<'_>> { in overlapping_impls() 107 _ => bug!("unexpected impls: {impl1_def_id:?} {impl2_def_id:?}"), in overlapping_impls() 111 // Some types involved are definitely different, so the impls couldn't possibly overlap. in overlapping_impls() [all …]
|
| /third_party/rust/rust/compiler/rustc_hir_analysis/src/coherence/ |
| D | mod.rs | 28 // Skip impls where one of the self type is an error type. in check_impl() 45 // Disallow *all* explicit impls of traits marked `#[rustc_deny_explicit_impl]` in enforce_trait_manually_implementable() 52 "explicit impls for the `{trait_name}` trait are not permitted" in enforce_trait_manually_implementable() 76 /// We allow impls of marker traits to overlap, so they can't override impls 95 "impls for marker traits cannot contain items" in enforce_empty_impls_for_marker_traits() 123 let impls = tcx.hir().trait_impls(def_id); in coherent_trait() localVariable 124 for &impl_def_id in impls { in coherent_trait() 169 // This is tested by `coherence-impl-trait-for-trait-object-safe.rs`. in check_object_overlap()
|
| /third_party/rust/rust/tests/ui/specialization/defaultimpl/ |
| D | specialization-trait-item-not-implemented.rs | 1 // Tests that default impls do not have to supply all items but regular impls do. 6 fn foo_one(&self) -> &'static str; in foo_one() 7 fn foo_two(&self) -> &'static str; in foo_two() 13 fn foo_one(&self) -> &'static str { in foo_one() 19 //~^ ERROR not all trait items implemented, missing: `foo_two` [E0046]
|
| /third_party/openssl/test/ |
| D | property_test.c | 2 * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. 3 * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved. 19 * We make our OSSL_PROVIDER for testing purposes. All we really need is 85 { "", "sky=blue", -1 }, 92 { "groan", "groan=no", -1 }, 93 { "groan", "groan!=yes", -1 }, 94 { "cold=no", "cold", -1 }, 97 { "groan", "cold", -1 }, 100 { "groan=blue", "groan=yellow", -1 }, 105 { "today=monday, tomorrow=3", "today!='monday'", -1 }, [all …]
|
| /third_party/rust/crates/serde/serde/ |
| D | Cargo.toml | 6 categories = ["encoding", "no-std", "no-std::no-alloc"] 12 license = "MIT OR Apache-2.0" 13 readme = "crates-io.md" 14 repository = "https://github.com/serde-rs/serde" 15 rust-version = "1.31" 20 [dev-dependencies] 24 doc-scrape-examples = false 31 targets = ["x86_64-unknown-linux-gnu"] 32 rustdoc-args = ["--cfg", "doc_cfg", "--generate-link-to-definition"] 51 # Provide impls for common standard library types like Vec<T> and HashMap<K, V>. [all …]
|
| /third_party/rust/rust/src/librustdoc/json/ |
| D | mod.rs | 4 //! output. See [the RFC](https://github.com/rust-lang/rfcs/pull/2963) and the [`types`] module 37 /// A mapping of IDs that contains all local items for this crate which gets output as a top 47 fn sess(&self) -> &'tcx Session { in sess() 51 fn get_trait_implementors(&mut self, id: DefId) -> Vec<types::Id> { in get_trait_implementors() 68 fn get_impls(&mut self, id: DefId) -> Vec<types::Id> { in get_impls() 70 .impls in get_impls() 72 .map(|impls| { in get_impls() 73 impls in get_impls() 78 // HACK(hkmatsumoto): For impls of primitive types, we index them in get_impls() 104 fn descr() -> &'static str { in descr() [all …]
|
| /third_party/rust/rust/tests/ui/dropck/ |
| D | dropck_fn_type.rs | 1 // run-pass 2 //! Regression test for #58311, regarding the usage of Fn types in drop impls 4 // All of this Drop impls should compile. 7 struct S<F: Fn() -> [u8; 1]>(F); 9 impl<F: Fn() -> [u8; 1]> Drop for S<F> { 14 struct P<A, F: FnOnce() -> [A; 10]>(F); 16 impl<A, F: FnOnce() -> [A; 10]> Drop for P<A, F> {
|
| D | dropck_traits.rs | 1 // run-pass 2 //! Regression test for #34426, regarding HRTB in drop impls 4 // All of this Drop impls should compile. 58 struct FnHolder<T: for<'a> Fn(&'a T, dyn for<'b> Lifetime2<'a, 'b>) -> u8>(T); 60 impl<T: for<'a> Fn(&'a T, dyn for<'b> Lifetime2<'a, 'b>) -> u8> Drop for FnHolder<T> {
|
| /third_party/rust/rust/compiler/rustc_trait_selection/src/traits/specialize/ |
| D | mod.rs | 5 //! If any two impls overlap, one must be a strict subset of the other. 10 //! [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/traits/specialization.html 50 /// type parameters of the two impls. Here the `source_impl` is the one we've 67 /// where-clauses add some trickiness here, because they can be used to "define" 77 /// *fulfillment* to relate the two impls, requiring that all projections are 85 ) -> SubstsRef<'tcx> { in translate_substs() 108 cause: impl Fn(usize, Span) -> ObligationCause<'tcx>, in translate_substs_with_cause() 109 ) -> SubstsRef<'tcx> { in translate_substs_with_cause() 118 // vary across impls in translate_substs_with_cause() 137 // directly inherent the method generics, since those do not vary across impls in translate_substs_with_cause() [all …]
|
| /third_party/rust/rust/tests/ui/rfcs/rfc-2632-const-trait-impl/ |
| D | feature-gate.stock.stderr | 1 error[E0658]: const trait impls are experimental 2 --> $DIR/feature-gate.rs:10:6 7 = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information 10 …porary placeholder for marking a trait that is suitable for `const` `impls` and all default bodies… 11 --> $DIR/feature-gate.rs:8:1 16 = note: see issue #67792 <https://github.com/rust-lang/rust/issues/67792> for more information 21 For more information about this error, try `rustc --explain E0658`.
|
| /third_party/rust/crates/rustix/ |
| D | Cargo.toml | 8 description = "Safe Rust bindings to POSIX/Unix/Linux/Winsock2-like syscalls" 10 license = "Apache-2.0 WITH LLVM-exception OR Apache-2.0 OR MIT" 14 categories = ["os::unix-apis", "date-and-time", "filesystem", "network-programming"] 16 rust-version = "1.48" 18 [build-dependencies] 23 itoa = { version = "1.0.1", default-features = false, optional = true } 24 io-lifetimes = { version = "1.0.0", default-features = false, features = ["close"], optional = true… 26 # Special dependencies used in rustc-dep-of-std mode. 27 core = { version = "1.0.0", optional = true, package = "rustc-std-workspace-core" } 28 alloc = { version = "1.0.0", optional = true, package = "rustc-std-workspace-alloc" } [all …]
|
| /third_party/rust/rust/src/librustdoc/formats/ |
| D | cache.rs | 21 /// information like all implementors of a trait, all traits a type implements, 22 /// documentation for all known traits, etc. 30 /// Maps a type ID to all known implementations for that type. This is only 31 /// recognized for intra-crate [`clean::Type::Path`]s, and is used to print 36 pub(crate) impls: DefIdMap<Vec<Impl>>, field 41 /// this map because the `External` type itself has all the information 57 /// doing this, we can detect duplicate impls on a trait page, and only display 61 /// This map contains information about all known traits of this crate. 67 /// When rendering traits, it's often useful to be able to list all 79 // non-reachable while local items aren't. This is because we're reusing [all …]
|
| /third_party/rust/crates/rustix/.github/workflows/ |
| D | main.yml | 6 - main 13 runs-on: ubuntu-latest 15 - uses: actions/checkout@v3 18 - uses: ./.github/actions/install-rust 21 - run: cargo fmt --all -- --check 25 runs-on: ${{ matrix.os }} 30 - build: stable 31 os: ubuntu-latest 33 - build: nightly 34 os: ubuntu-latest [all …]
|
| /third_party/rust/rust/tests/ui/coherence/ |
| D | coherence-overlap-negative-impls.rs | 1 // check-pass 2 // known-bug: #74629 4 // Should fail. The `0` and `1` impls overlap, violating coherence. Eg, with 5 // `T = Test, F = ()`, all bounds are true, making both impls applicable.
|
| /third_party/rust/crates/syn/ |
| D | Cargo.toml | 5 categories = ["development-tools::procedural-macro-helpers", "parser-implementations"] 12 "/LICENSE-APACHE", 13 "/LICENSE-MIT", 19 license = "MIT OR Apache-2.0" 21 rust-version = "1.56" 24 default = ["derive", "parsing", "printing", "clone-impls", "proc-macro"] 30 visit-mut = [] 32 clone-impls = [] 33 extra-traits = [] 34 proc-macro = ["proc-macro2/proc-macro", "quote/proc-macro"] [all …]
|
| /third_party/rust/crates/syn/codegen/src/ |
| D | eq.rs | 9 fn always_eq(field_type: &Type) -> bool { in always_eq() 14 Type::Tuple(inner) => inner.iter().all(always_eq), in always_eq() 19 fn expand_impl_body(defs: &Definitions, node: &Node) -> TokenStream { in expand_impl_body() 111 fn expand_impl(defs: &Definitions, node: &Node) -> TokenStream { in expand_impl() 117 let cfg_features = cfg::features(&node.features, "extra-traits"); in expand_impl() 132 Data::Struct(fields) if fields.values().all(always_eq) => quote!(_other), in expand_impl() 141 fn eq(&self, #other: &Self) -> bool { in expand_impl() 148 pub fn generate(defs: &Definitions) -> Result<()> { in generate() 149 let mut impls = TokenStream::new(); in generate() localVariable 151 impls.extend(expand_impl(defs, node)); in generate() [all …]
|
| /third_party/rust/rust/tests/ui/deriving/ |
| D | deriving-all-codegen.rs | 1 // check-pass 2 // compile-flags: -Zunpretty=expanded 5 // This test checks the code generated for all[*] the builtin derivable traits 48 // A struct that doesn't impl `Copy`, which means it gets the non-simple 53 // A packed struct that doesn't impl `Copy`, which means it gets the non-simple 59 // A struct that impls `Copy` manually, which means it gets the non-simple 65 // A packed struct that impls `Copy` manually, which means it gets the 66 // non-simple `clone` implemention that clones the fields individually. 81 //~^ WARNING byte slice in a packed struct that derives a built-in trait 82 //~^^ WARNING byte slice in a packed struct that derives a built-in trait [all …]
|