6 matches across 1 files for func main lang:Markdown path:compiler/rustc_error_codes/src/error_codes/E0038.md lang:Markdown
snippet_mode: auto · sorted by relevance
compiler/rustc_error_codes/src/error_codes/E0038.md MARKDOWN 6 matches · showing 5 view file →
109If only some methods aren't dyn-compatible, you can add a `where Self: Sized`
110bound on them to mark them as explicitly unavailable to trait objects. The
111functionality will still be available to all other implementers, including
112`Box<dyn Trait>` which is itself sized (assuming you `impl Trait for Box<dyn
113Trait>`).
· · ·
116trait Trait {
117 fn foo(&self) -> Self where Self: Sized;
118 // more functions
119}
120```
· · ·
171type parameters, the number of monomorphized implementations the compiler
172generates does not grow drastically, since the compiler will only generate an
173implementation if the function is called with fully concrete arguments
174(i.e., arguments which do not contain any generic parameters).
175
· · ·
264### Trait contains associated constants
265
266Just like static functions, associated constants aren't stored on the method
267table. If the trait or any subtrait contain an associated constant, they are not
268dyn compatible.
· · ·
301impl Trait for Foo {}
302
303fn main() {
304 let x: Box<dyn Trait>;
305}
+ 1 more matches in this file
Search syntax
auth loginboth terms (AND is implicit)
auth OR logineither term
NOT path:vendorexclude matches
"exact phrase"quoted exact match
/func\s+Test/regex
handler~1fuzzy (Levenshtein 1)
file:*_test.gofilename glob
path:pkg/auth/**full path glob
lang:golanguage filter

Search any public repo from your terminal

This page calls POST /api/v1/code_search. Same tool, available over MCP for Claude/Cursor/Copilot.